In a partitioned configuration, the data is divided across multiple True Caches, which each cache a different subset of the data. The total size of the cached data across all True Caches can be much larger than it would be for a single primary database or a single cache in a uniform configuration.
A partitioned configuration with COLOCATION_TAG
similar to the uniform configuration, except that when you set COLOCATION_TAG
within the CONNECT_DATA
parameter of your network alias, load balancing is ignored. The listener tries to send all connections that have the same COLOCATION_TAG
to the same True Cache.
This diagram shows an example of a partitioned configuration with COLOCATION_TAG
with the following elements:
- One primary database (
PRIMDBI
) - Two True Caches (
TCDB1I
andTCDB2I
) - One remote listener (
sales_rl
) - Two applications
- Sessions with
COLOCATION_TAG
set toUS
go to one True Cache (TCDB1I
). - Sessions with
COLOCATION_TAG
set toEUROPE
go to the other True Cache (TCDB2I
).
- Sessions with
In this example, both True Caches are in the same data center. One True Cache processes all requests with the client's TNS CONNECT_DATA
tagged with US
(connections coming from US
) and the other processes all requests with the client's TNS CONNECT_DATA
tagged with EUROPE
(connections coming from EUROPE
).
When True Cache starts, the True Cache network name that is specified in the FAL_CLIENT
parameter (TCDB1I
or TCDB2I
) is registered with the primary database network name that is specified in the FAL_SERVER
parameter (PRIMDBI
).
If the application handles connections manually, it sends queries to True Cache through a True Cache database application service, and it sends other queries and updates to the primary database through the primary database application service.
To achieve more application transparency, you can use the JDBC method and associate primary database application services with True Cache database application services. This diagram shows the following database application services:
- The primary database (
PRIMDBI
) runs one database application service calledSALES
. - Two True Caches (
TCDB1I
andTCDB2I
) share one database application service calledSALES_TC
.
The two services are associated by setting the TRUE_CACHE_SERVICE
parameter to SALES_TC
for the primary database application service (SALES
). The application's code only needs to know about the primary database application service (SALES
). To use the SALES_TC
database application service, the application changes the setReadOnly
flag (TRUE
or FALSE
) of the SALES
JDBC connection.
The True Caches and the primary database share a remote listener (sales_rl
).