GDS provides connect time and run-time load balancing (within and across regions/data centers) for all work requests.
GDS enables runtime load balancing across replicated databases by publishing a real-time load balancing advisory for connection pool-based clients (for example, OCI, JDBC, ODP.NET, WebLogic, and so on.). The connection pool-based clients subscribe to this load-balancing advisory and route database requests in real time across already-established connections.
With GDS's runtime connection load balancing feature, application client work requests are dynamically routed to the database that offers the best performance. In addition, GDS also supports the ability to dynamically re-distribute connections when the database performance changes.
With GDS's connect time load balancing, global service managers use the load statistics from all databases in the GDS pool, inter-region network latency, and the configured connect-time load balancing goal to route the incoming connections to the best database in a GDS pool.
The diagram shows SALES GDS Pool in three different deployments setups:
- Deployment 1 illustrates Active-Active database architecture using Oracle GoldenGate replication.
- Deployment 2 showcases Active-Passive database architecture utilizing Oracle Active Data Guard.
- Deployment 3 uses Oracle True Cache for optimizing read performance.
Deployment 1: Load balancing for Active-Active Oracle GoldenGate
GDSCTL>add service -service order_entry_srvc -gdspool sales -preferred_all -clbgoal LONG
In an active-active setup, RW workloads can be processed on both replicas or distributed based on workload type. RW services can be configured to balance traffic dynamically across available replicas. RO workloads can run on both replicas or be distributed independently of RW workloads. RO services can be configured to distribute queries optimally across multiple replicas for better performance.
Deployment 2: Load balancing for Active-Passive Oracle Data Guard Standby
GDSCTL>add service -service reporting_srvc -gdspool sales -preferred_all -role PHYSICAL_STANDBY -clbgoal LONG -rlbgoal SERVICE_TIME
In an active-passive setup, RW workloads are processed only on the primary database. If the primary is a RAC database, workloads may be distributed across RAC nodes, but they are not balanced across multiple databases. One or more standby databases can be used to offload RO workloads from the primary. If multiple standby databases exist such as a reader farm, RO workloads may be load-balanced among them.
Deployment 3: Load balancing for Oracle True Cache
GDSCTL>add service -service reporting_srvc -gdspool sales -preferred_all -role TRUE_CACHE -failover_primary
In True Cache setup, RO workloads are processed in Oracle True Cache for quick response times and RW workloads are directed to primary database. GDS provides load balancing and service failover between multiple True Caches.
Example TNS Entry in Client A and Client B tnsnames.ora:
order_entry_srvc =
(DESCRIPTION=(CONNECT_TIMEOUT=90)(RETRY_COUNT=30)(RETRY_DELAY=3)(TRANSPORT_CONNECT_TIMEOUT=3)
(FAILOVER=ON)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=GSM-EAST)(PORT=1522))
(ADDRESS=(PROTOCOL=TCP)(HOST= GSM-EAST2)(PORT= 1522))
(ADDRESS=(PROTOCOL = TCP)(HOST=GSM-EAST3)(PORT=1522))
)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=GSM-WEST)(PORT=1522))
(ADDRESS=(PROTOCOL=TCP)(HOST= GSM-WEST2)(PORT= 1522))
(ADDRESS=(PROTOCOL = TCP)(HOST=GSM-WEST3)(PORT=1522))
)
(CONNECT_DATA=
(SERVICE_NAME=order_entry_srvc.sales.oradbcloud) (REGION=EAST)
)
Example TNS Entry in Client C and Client D tnsnames.ora:
reporting_srvc =
(DESCRIPTION=(CONNECT_TIMEOUT=90)(RETRY_COUNT=30)(RETRY_DELAY=3)(TRANSPORT_CONNECT_TIMEOUT=3)
(FAILOVER=ON)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=GSM-EAST)(PORT=1522))
(ADDRESS=(PROTOCOL=TCP)(HOST= GSM-EAST2)(PORT= 1522))
(ADDRESS=(PROTOCOL = TCP)(HOST=GSM-EAST3)(PORT=1522))
)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=GSM-WEST)(PORT=1522))
(ADDRESS=(PROTOCOL=TCP)(HOST= GSM-WEST2)(PORT= 1522))
(ADDRESS=(PROTOCOL = TCP)(HOST=GSM-WEST3)(PORT=1522))
)
(CONNECT_DATA=
(SERVICE_NAME=reporting_srvc.sales.oradbcloud) (REGION=WEST)
)