Thresh

This section explains how the MySQL application architecture evolves at different levels of concurrent access and data.

MySQL application architecture evolution

  • The architecture behind a simple small website or application can be very simple. Data storage only needs one MySQL Instance to meet data reading and writing requirements (the Instance of data backup is ignored here). At this stage, the system, Typically, all information is stored in a MySQL Instance. Disadvantages: 1. Large amount of data exceeds the capacity of one server 2. Large amount of read/write operations exceeds the capacity of one server 3. When a server dies, the application dies (poor availability)

  • The master/slave architecture mainly solves the problems of high availability and read expansion in a single architecture. Mount the slave library for Instance to solve the reading pressure. When the master library is down, the master/slave switchover can also ensure high availability. In the context of MySQL, it is through the master-slave structure (the dual-master structure also belongs to the special slave structure). The master library can resist the write pressure and share the read pressure through the slave library. The disadvantages of the application with less write and more read are as follows: 1. The data amount is too large for one server. 2. The write operation is too large for one primary server

  • When the writing bottleneck and storage bottleneck are encountered in the database and table, horizontal splitting can be solved by horizontal splitting. There is a big difference between horizontal splitting and vertical splitting. After vertical splitting, each instance has all the data, while after horizontal splitting, any instance has only 1/ N of the full amount of data. Disadvantages: 1. How to route data becomes a key problem, which can be split by scope, List, Hash, etc. 2. How to maintain the consistency of data is also a difficult problem.

  • Cloud database Cloud database (cloud computing), for MySQL data storage, how to make it a Software as a Service (saas) is the key point. MySQL as a saas service, service providers are responsible for solving problems such as configurability, scalability, and multi-user storage architecture design.