13.2.3 COLOCATION_TAG of Client Connections

The COLOCATION_TAG parameter is an alphanumeric string that you can use with the CONNECT_DATA parameter of the TNS connect string.

When you set the colocation_tag within the CONNECT_DATA parameter, load balancing is ignored. The listener makes an effort to send all connections that have the same colocation_tag to the same database instance. The instance selection algorithm is based on the colocation_tag, and the list of available instances for the specified service.

For example, the listener will try to route all clients to the same database instance that have the COLOCATION_TAG set to interactive in the connection descriptor.


sales.us.example.com=
  (DESCRIPTION=
     (ADDRESS=(PROTOCOL=tcp)(HOST=sales-scan)(PORT=1521))
     (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)(COLOCATION_TAG=interactive)))
    

Note:

Under certain conditions, such as, when maximum load of an instance is reached or when new instances are added or deleted for a service, the colocation of client connections that have the same colocation_tag to the same database instance may not be consistent.

Related Topics