Advantages of MyCAT: can unified control the number of database links, sub-database sub-table, separation of front-end projects directly access the database, will only access myCAT to find a logical library [unified management, only access myCAT]

 

Mycat can implement master-slave replication, but only in a user-only master-slave schema, because in a master-multiple-slave schema, the following would happen:

The master goes down and switches to one of the slave libraries. The other slave libraries do not synchronize data. So you can use mycat to connect MHA

 

 

Generally speaking, horizontal segmentation is carried out after vertical segmentation, database segmentation and table segmentation

If one of the primary DB tables continues to be full after you hammer shard, you can only shard horizontally, because vertical shard usually splits the unassociated business logic tables separately.

There is no way to continue splitting the current module, so horizontal splitting is considered at this point.

Horizontal shard is generally shard by primary key ID

Shard table: a table split horizontally. It has the same structure but different data. All the shard tables are summarized into a database as a whole table

Global table: the table that exists in each shard library, can only be modified by mycat operation

Er relational table: puts tables with child and parent relationships in the same shard, not across libraries