Graceful Application Switchover

Database services are used to manage workloads during the planned outage properly. Services must be properly created, and the application must obtain connections from a service.

These recommendations assume using a FAN-aware connection pool, such as Oracle Universal Connection Pool (UCP) to gracefully drain connections without application interruption from a service that is stopped. Your applications can use other connection types that don't support FAN-aware connection pools or have long-running transactions. Ideally, these applications will be disconnected before the maintenance window.

The recommendations below describe how to disconnect some sessions when their transaction ends in a timely manner or, ultimately, when the instance is shut down for maintenance.

The recommended and validated approach to understanding and optimizing your application's connection configuration is provided in the following sections; certain applications may have specific guidelines to follow.

Understanding Your Application's Use of Connections

Understanding how your application obtains and releases its connections is critical to determining whether it can gracefully switch to other instances in the cluster.

Find the following information about your application:

  • What was the workload during the planned outage (OLTP/short or batch/long transactions)?
  • Short transactions using a connection pool such as UCP or ODP.NET can be quiesced rapidly.

    • Long transactions need additional time to quiesce or must have batch jobs stopped or queued at an appropriate time in advance.
  • What type of connection was obtained: Java, OCI, ODP with C#, or ODP with OCI)?
  • UCP, ICC, ODP.NET, and OCI session pools use Fast Application Notification (FAN) to drain the pool quickly; other connections require waiting until the connection is closed (or termination if the application allows)
  • What is the amount of time to wait for the connection pool to quiesce before stopping the service?
  • Useful to know the proper amount of time is given before disconnection is performed
  • Can the application handle disconnection after the transaction completes (applies to batch workloads)?
  • If the application can't handle being disconnected gracefully, it must be stopped before the planned maintenance, or Application Continuity might be an option to avoid interruption.

Services and Application Configuration Best Practices

You must have properly configured services and application attributes to perform a graceful switchover successfully. See Knowledge Base KB69670, Client and Application Failover Validation Matrix Doc ID 1617163.1 for a matrix of validated drivers and applications clients.

Note:

You must test your configuration to ensure that it is set up and performs switchover properly before relying on it for a production system.

Parent topic: Managing Global Services