OpenSwitch has a connection monitor (CMON) thread that monitors Adaptive Server and asynchronously notifies threads as soon as connectivity to the remote server is lost.
At the first successful connection attempt to a remote server, OpenSwitch starts a new CMON thread to monitor the state of the remote server. This thread runs as long as the remote server it is monitoring remains online. At the first indication of a remote server failure, the CMON thread notifies all client threads currently connected to the failed server that they (or a server specified by the coordination module) should connect to the next available server in the pool. The busy clients are issued a deadlock error (1205) message and switched immediately to the next server while the idle clients are switched immediately. This failover detection process is always localized to a single connection, and connections are never automatically switched by OpenSwitch without either a switch request or a server down event. If you want all client connections to fail over to the secondary data server at the same time, you can use a coordination module to coordinate the various connections. See the OpenSwitch Coordination Module Reference Manual for complete instructions on creating and using coordination modules.