Architecture V: database read and write separation

1. Brief description

In that framework four foundation will make the database read and write separation, before bloggers set up a Linux server through a master-slave environment, build this environment is not very difficult, it would be half past one can not find where to write, would later master-slave the building also organized into blog, this may well alleviate the pressure to write database, imagine inside the subway station, Taoist and more crowded subway we all know, it might have people crowded pregnant. But the entrance to the subway station similar to our database to read and write, is to export the database (read), the entrance is the database (write), it can be described as entirely different, relieve stress out of an occupant.

2. A flowchart

Here Insert Picture Description

3. Problems

  1. From the main way is good, but I had the operation, the data inside the database from the primary synchronization can not be deleted, after deleting the data will lead to a master-slave synchronization failure;
  2. Because you can not just delete data, cause a lot of useless data, a waste of server disk space, can lead to large amount of data query, data query and affect performance.

This is my memory problem arises, if the latter will continue to add another encounter.

Published 215 original articles · won praise 135 · Views 1.14 million +

Guess you like

Origin blog.csdn.net/weinichendian/article/details/103974432