In the KBMMW balanced load and disaster tolerance (1), this paper introduces the use of Clienttransport Onreconnect event to replace the address of the connected Application server and do disaster tolerant treatment. In fact, the author gives us another mechanism to define how the server can be joined and how to switch it directly in Clienttransport. Specifically, there are three attributes, such as:
1.FallbackServers: Define a list of accessible application servers and add a AppServer address join string at a time, that is, the service address.
2.AutoFallback: Enable fallbackservers address; If fallbackservers is defined, the property should be set to true;
3.MaxRetriesAlternative: The number of times to switch server addresses, typically defined by the number of entries defined by Fallbackservers, there are several servers that can be joined are set to several.
With these three attributes, the design period is defined so that disaster tolerance can be easily achieved! When a client join request fails, it automatically switches to the next appserver, and tries to focus on it until the number of maxretriesalternative definitions is exhausted
Here, for ConnectionString it is necessary to explain, we fill in fallbackservers, put a clienttransport, and then set his connection properties, such as: Kbmmwindyclienttransport
Host,port and so on, in the case of ensuring the right, double-click his
ConnectionString property, from the open window, you can copy the information needed to get the connection here!
KBMMW balanced load and disaster recovery (3) (reproduced Red Fish)