The core concept

  • The main library
  • From the library
  • Master-slave synchronization
  • Load Balancing Policy

The main library

The database used to add, update, and delete data operations. Currently, only single master libraries are supported.

From the library

Query the database used by the data operation. Multiple slave libraries are supported.

Master-slave synchronization

The operation of asynchronously synchronizing data from a master library to a slave library. Due to the asynchronous nature of master-slave synchronization, data from the slave and master libraries may be inconsistent for a short time.

Load Balancing Policy

The query requests are channeled to different slave libraries through load balancing policies.

The core function

  1. Provides one master and multiple slave read/write separation configuration, which can be used independently or in conjunction with sub-database and sub-table.
  2. Independent use of read/write separation supports SQL transparent transmission.
  3. In the same thread and the same database connection, if there is a write operation, the subsequent read operations are read from the primary library to ensure data consistency.
  4. Hint-based enforcing master library routing.

Item does not support

  1. Data synchronization between master and slave libraries.
  2. Inconsistent data due to data synchronization delays between master and slave libraries.
  3. Primary library double write or multiple write.
  4. Inconsistent data for transactions across master and slave libraries. In the master-slave model, both read and write transactions use the master library.