Routing rules direct incoming client connections to the appropriate logical cluster. See “Assigning routing rules”. However, routing rules do not specify how connections should be handled when the target logical cluster is offline, or when redirection is required and the connection does not support redirection.
The Client-Library property CS_PROP_REDIRECT
determines whether a client connection supports login redirection.
By default, the value of CS_PROP_REDIRECT is true,
and the client connection supports login redirection. See the Client-Library/C
Reference Manual.
You can specify a down-routing mode to direct connections when routing rules cannot be applied.
You can also use this attribute to reserve certain instances for specific connections. See “Resource reservation”.
Use sp_cluster logical, "set" to configure the down-routing mode. Values are:
system – sends unroutable connections to the system logical cluster. system ensures the highest availability as the system logical cluster is always online for every instance. This is the default setting.
open – sends unroutable connections to the open logical cluster. If the connection cannot be sent to the open logical cluster, or the connection does not support redirection, Adaptive Server applies the down-routing mode of the open logical cluster.
disconnect – disconnects unroutable connections. This setting can enforce resource reservation by disconnecting clients that cannot be served by instances in the target logical cluster. See “Resource reservation”.
For example, to set the down-routing mode to open for “SalesLC”, enter:
sp_cluster logical, "set", SalesLC, down_routing, "open"
This example ensures that, if “SalesLC” is unavailable, clients bound to that logical cluster are routed to the open logical cluster.
You can use the open property in conjunction with the disconnect down-routing mode to reserve one or more instances for the exclusive use of a specific logical cluster. Suppose, for example, that you want to reserve instance “ase3” for the exclusive use of the “HRLC” logical cluster:
Set the open property to a logical cluster that does not include “ase3.”
Set the down-routing mode of the open logical cluster to disconnect so that even clients that do not support redirection cannot access it.
Only connections with routing rules specifying “HRLC” can connect to “ase3.”