10.3 True Cache Implementation with Global Data Services

These examples show some of the most common use cases for implementing True Cache with Oracle Global Data Services (GDS).

10.3.1 Configuring True Cache for High Availability (Failover to Read-Write)

In this mode, the application sends all read-write workloads to the primary database and all read-only workloads to True Cache.

If True Cache is unavailable, the application sends all read-only workloads to the primary database.



The following GDSCTL commands add the services:

add service -service sales.example.com -gdspool sales -preferred primdb1i -pdbname sales_pdb -role primary
add service –service sales_tc.example.com -gdspool sales -preferred_all -pdbname sales_pdb -role true_cache -failover_primary

Note:

To use the -failover_primary option, install patch 37099586 on the GSM home.

10.3.2 Using True Cache for Read Offloading and Write Redirection

In this model, applications send read-write workloads to the primary database and offload some or all read-only workloads to True Cache.

The following example has two applications:

  • Application 1 sends read-write workloads to the primary database and offloads infrequent read-only workloads to True Cache.
  • Application 2 sends read-only workloads to True Cache and occasional read-write workloads to the primary database.

If True Cache is unavailable, both applications send all read-only workloads to the primary database.



The following GDSCTL commands add the services:

add service -service sales1.example.com -gdspool sales -preferred primdb1i -pdbname sales_pdb -role primary
add service -service sales2.example.com -gdspool sales -preferred primdb1i -pdbname sales_pdb -role primary
add service -service sales1_tc.example.com -gdspool sales -preferred_all -pdbname sales_pdb -role true_cache -failover_primary
add service -service sales2_tc.example.com -gdspool sales -preferred_all -pdbname sales_pdb -role true_cache -failover_primary

Note:

To use the -failover_primary option, install patch 37099586 on the GSM home.

10.3.3 Using True Cache for a Singleton Read-Only Service

In this model, applications share a service that runs on only one True Cache at a time, for example, because they need to read data from the same point in time.

The following example has two applications and two True Caches. The applications share one service to send read-write workloads to the primary database, and they share another service to send read-only workloads to the preferred True Cache. If the preferred True Cache is unavailable, the service fails over to the other available True Cache. If both True Caches are unavailable, the applications send read-only workloads to the primary database.

If a True Cache falls behind the primary database beyond the specified lag time, the service stop forwarding requests to that True Cache until it catches up.



The following GDSCTL commands add the services:

add service -service sales.example.com -gdspool sales -preferred primdb1i -pdbname sales_pdb -role primary
add service -service sales_tc.example.com -gdspool sales –preferred TC1 -available TC2, primdb1i -pdbname sales_pdb –role true_cache -failover_primary -lag 15

Note:

When adding True Cache services with a preferred True Cache, you currently need to include the primary database in the -available list. This might change in the future.

Note:

To use the -failover_primary option, install patch 37099586 on the GSM home.

10.3.4 Configuring True Cache as a Reader Farm (Read-Only)

In this model, services for specific workloads run on dedicated True Caches and failover to True Caches that are dedicated to other services if the initial True Caches become unavailable.

The following example has three applications: music, video, and books. Each application sends read-only workloads to two dedicated True Caches.

If the dedicated True Caches for one application are unavailable, the application sends workloads to True Caches that are dedicated to another service.



The following GDSCTL commands add the services:

add service –service music.example.com -gdspool sales –preferred TC1, TC2 -available TC3, TC4, primdb1i -pdbname sales_pdb –role true_cache
add service –service video.example.com -gdspool sales –preferred TC3, TC4 -available TC5, TC6, primdb1i -pdbname sales_pdb –role true_cache
add service –service books.example.com -gdspool sales –preferred TC5, TC6 -available TC1, TC2, primdb1i -pdbname sales_pdb –role true_cache

Note:

When adding True Cache services with a preferred True Cache, you currently need to include the primary database in the -available list. This might change in the future.