Several points to pay attention to in the use of connection manager

Informix cannot provide the function of SCAN IP, but uses two CM methods to complete the database's main-standby switch and client request forwarding.

The usual practice is to configure and start two or more CMs, put them in a cm_group, and use two CMs by using SQLH_TYPE and SQLH_FILE in the URL.

But I encountered several problems in the use of CM:

1. If among the cm_group members, the previous CM instance is unavailable, it will take a long time for the application to establish a connection, and there is a time to repeatedly confirm that the first CM is unavailable;

2. Although you can install and start CM without installing the database instance, there is no problem, but you cannot execute onstat -g cmsm

3. If the database is down, the CM process may still be there, and a situation where the database port is occupied once occurs, causing the database to fail to bind the port and start

 

Considering this confused CM, my thoughts may be more radical, but I still recommend the following:

1. Configure and start two CMs;

2. The value of PRIORITY must be greater than 100;

3. For the application, I recommend connecting to only one CM instance, which is similar to connecting to a stand-alone database instance;

4. It is recommended to consider the method of PROXY=redirect

      The similar benefit is that the two CMs will ensure the switch of the database;

      The larger value of PRIORITY is to ensure and control the priority of the two CMs unchanged;

      The application is only connected to one CM, and the connection speed can be guaranteed. If the CM is really down, restart it (basically, there is no problem of being unable to get up)

Guess you like

Origin blog.csdn.net/David_ifx/article/details/114540706