Eureka introduction of some design ideas

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/chengqiuming/article/details/102767698

AP is better than a CP

There is an important field of distributed systems of CAP theory, which referred to the three characteristics of distributed systems CAP.

  • Consistency: consistency of data, namely data in the presence of multiple copies, may be due to network, computer room failure, software systems and other issues led to a partial copy of the data written to success, a partial replica failure, which causes data inconsistency between replica, there is a conflict. After the update is required to meet the conformance to the success of data, multiple copies of data consistent.
  • Available: cluster when read and write operations at any time client, the normal response to the request, i.e., completed within a certain delay.
  • Partition Tolerance: When partition tolerance, that is a communication failure, the entire cluster is divided into multiple partitions can not communicate with each other, the cluster is still available.

For Zookeeper, it can only meet the CP.

For Eureka, designers take full account, it can meet the AP.

Two Peer to Peer

Data Generally, in a distributed system between multiple copies of replication, divided into the main and copying from the copy of the other.

1 master-slave replication

Master-slave replication is known Master-Slave mode, ie there is a master copy, the other copy from the copy. All write operations on the data are submitted to the master copy, and finally update the master copy to copy from the other.

For the master-slave replication, the write operation of the pressure in the master copy, which is the bottleneck of the whole system, but may be a copy from shared main fact copy read request.

Two pairs of peer replication

Peer to Peer mode, i.e., regardless of the master copy from among, any copy can receive a write operation, updating data between each other and each copy.

For peer copy mode is concerned, can receive any copy because the write operation request, the write operation pressure no bottlenecks. However, because each copy can be written processing, data synchronization between the various copies and conflict resolution is a problem more difficult. Need to be addressed.

Eureka Server is using Peer to Peer mode of replication.

 

Guess you like

Origin blog.csdn.net/chengqiuming/article/details/102767698