What is FAN Fast Application Notification FAN is

  • Slides: 12
Download presentation

What is FAN? • Fast Application Notification (FAN) is a RAC notification mechanism •

What is FAN? • Fast Application Notification (FAN) is a RAC notification mechanism • FAN HA Events: Notification of Up/Down for service, instance & node • Load Balancing Advisory Events: Advise clients of current load for service and where to send connection requests • Enable it, and Forget it.

Oracle Notification Service (ONS) • Publish/Subscribe Messaging System • Allows both local and remote

Oracle Notification Service (ONS) • Publish/Subscribe Messaging System • Allows both local and remote consumption • Used by Fast Application Notification (FAN) to publish HA Events and Load Balancing Events • Used by FAN clients to subscribe to events • Automatically installed and configured by the installation of Oracle Clusterware • DO NOT TURN OFF – Required by Oracle Clusterware and RAC

Fan Clients • HA Events: JDBC Implicit Connection Cache, OCI, ODP. NET Connection Pools,

Fan Clients • HA Events: JDBC Implicit Connection Cache, OCI, ODP. NET Connection Pools, Listener, Server Side Callouts, CMAN • Load Balancing Advisory Events: JDBC Implicit Connection Cache, ODP. NET Connection Pools, Listener, CMAN

Fast Connection Failover • Fast and reliable high availability for connections in an Oracle

Fast Connection Failover • Fast and reliable high availability for connections in an Oracle RAC environments • Enable it and forget it • Application can make it transparent to user by trapping SQL Exception and retrying • Supported by Oracle JDBC, OCI, and ODP. NET

JDBC Fast Connection Failover • • • JDBC FCF, JDBC Implicit Connection Cache (UCPand

JDBC Fast Connection Failover • • • JDBC FCF, JDBC Implicit Connection Cache (UCPand the ONS Turning on the Fast Connection Failover feature with JDBC includes Runtime Connection Load Balancing. The JDBC connection pool subscribes to the FAN Load Balancing events automatically when you configure fast connection failover. Instead of randomly assigning a free connection, the connection pool will choose the connection that will give the best service according to the latest information it has received. If a node becomes hung, it will gravitate connections from the hung node to other nodes in the cluster.

JDBC and UCP • • • Universal Connection Pool is the new connection caching

JDBC and UCP • • • Universal Connection Pool is the new connection caching mechanism Uses a new class, Pool. Data. Source, for connection pooling rather then the Oracle. Data. Source [with the cache option enabled] Is driver, protocol, and database independent. Supports non-JDBC connections and JDBC connections to databases other than Oracle. When using Oracle JDBC it provides advanced Oracle features including – – – connection attributes to stripe and reuse connections a connection cache manager per VM to manage one or more connection caches abandoned connection timeout to reclaim idle checked out connections

Load Balancing Advisory • Load Balancing Advisory is an advisory for balancing work across

Load Balancing Advisory • Load Balancing Advisory is an advisory for balancing work across RAC instances. • Load Balances at the transaction level (not connections!) – Directs work to where services are executing well and resources are available. – Adjusts distribution for different power nodes, different priority and shape workloads, changing demand. – Stops sending work to slow, hung, failed nodes early.

Runtime Connection Load Balancing • When application does “get. Connection”, the connection given is

Runtime Connection Load Balancing • When application does “get. Connection”, the connection given is the one that will provide the best service. • Supported by Oracle JDBC, OCI, and ODP. NET connection Pools • Policy defined by setting GOAL on Service • Need to have Oracle Net Services Connection Load Balancing

FAN Event Flow • CRSD PE Master is the source of all events and

FAN Event Flow • CRSD PE Master is the source of all events and publishes them events ONSD. • ONSD makes events available on all cluster nodes in the order they were published. • All agents on all nodes subscribe to events from ONSD. • DB agent processes events and publishes them to AQ to be consumed by OCI clients. • DB agent reads LBA from database and posts it to e. ONS and the ONS publisher fwds it over ONS. • ONS agent processes events to creates FAN events and publishes them over ONS.

JDBC For Java applications, you can use the Oracle Database 11 g JDBC Fast

JDBC For Java applications, you can use the Oracle Database 11 g JDBC Fast Connection Failover feature of the Implicit Connection Cache. The steps required to implement FAN with Oracle Database 11 g JDBC are: 1. Enable JDBC Implicit Connection Cache/UCP and JDBC Fast Connection Failover in datasource. For faster failover of the client connection set TCP connect timeout property. 2. Configure the ONS on each RAC node to be aware of your application tiers. 3. Define the JDBC data source parameters to point to the remote ONS in the RAC cluster. 4. When starting the application, ensure that the ons. jar file is located in application CLASSPATH.

Fast Connect Failover and Transparent Application Failover Fast Connect Failover (FCF) Transparent Application Failover

Fast Connect Failover and Transparent Application Failover Fast Connect Failover (FCF) Transparent Application Failover Driver Dependency JDBC-Thin and JDBC-OCI JDBC- OCI/OCCI Failover Connection Pool UCP, ICC, OCI-session, WLS OCI-Session, DRCP, TUX App level connection retries Application retries connection or throws exception Retries connection transparently, independent of the application retry Load Balancing Support up event load balancing and runtime distribution of work N/A Transaction Management FCF automatically rolls back in-flight transactions Require the application to roll back the transaction and send an acknowledgment to TAF to proceed with the failover. Failover Based on FAN events With or without FAN events When to Use Dataguard, Standby, Rapid node/instance/service detection scenarios Read only, Mostly Read only, Queries