Distributed learning notes

A, CAP theory

1, distributed three indicators: fault-tolerant partitions (Partition tolerance), availability (Availability), consistency (Consistency). The three indicators can not be done at the same time, this is the CAP theory.

2, fault-tolerant partition (Partition tolerance): mean range communication may fail, for example: a server in China, a server in the United Kingdom, this communication may fail between the two servers, so the design of the system time should be as Taking into account this aspect.

3, availability (Availability): means that no matter which server receives a user request must respond.

4. Consistency (Consistency): means that data must be consistent between, for example: A write a data server, A server can only read this message, the server B may also read this message.

Availability and consistency in design of the system can select between a target, because of conflict between the two: for example, when a server A writes data at a time and not immediately to put the data synchronization server B to go. If at this time the user has access to the server B, server B at this time and this data can not be read, the read and write operations locked before the server B in order to maintain consistency of the data at this time, only the data synchronized to the server B. Then when the user accesses the server B server can not respond to the user's request, the availability of which is to produce on the conflict. So the two can only be based on specific business needs to choose which to achieve.

Guess you like

Origin www.cnblogs.com/xhen/p/11079214.html