This document describes the momentary disconnection prevention feature of the TencentDB for MySQL database proxy.
During the instance Ops, you may need to make some adjustments, such as configuration modification, planned HA switch, and planned restart. Theses Ops may cause the problems, such as session interruption, momentary disconnection and failed new connections. The TencentDB for MySQL database proxy provides the momentary disconnection prevention feature that enables lossless application continuity to prevent disconnection and transaction interruption.
The momentary disconnection prevention feature implements MySQL’s session track mechanism. When the lossy behavior is perceived, the database proxy will disconnect the client from the source node before the switch, and connect to the source node after the switch. Then the session-related system variables, user variables, and character set encoding information will be transferred to the new backend connection through the session track mechanism, so as to realize the lossless switching on the application side.
The performance test of the momentary disconnection prevention feature for Tencent DB for MySQL database proxy is described in the following.
The information of the tested TencentDB for MySQL instance is as follows:
SysBench, as the tool for the performance test, is a modular, cross-platform, and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance without setting up complex database benchmarks or even without installing a database at all.
In different Ops scenarios, you can analyze the ratio of momentary disconnections before and after the operation to test whether a database proxy provides momentary disconnection prevention for the high-availability MySQL instance.
In the following Ops scenarios, the high-availability MySQL instance maintains a 100% connection keep-alive rate by the momentary disconnection prevention capability of the database proxy.
Ops scenario | Keep-alive rate |
---|---|
Performing source-replica switch | 100% |
Upgrading kernel minor version | 100% |
Adjusting the instance specifications | 100% |
Was this page helpful?