springcloud learn a

Registry

Understand registry

Service management is a core service registry, heartbeat mechanism dynamic maintenance

Service provider provider

Start their own network when reporting information to the registry

Consumers consumer service

Start their own network when reporting information to the registry, pulling provider of network-related information

Why use Registry

Micro-service machines and more and more, the caller needs to know the network address of the interface, if the configuration file on the way to control network addresses for dynamic new machines, great question.

Mainstream registry

zookeeper,Eureka,consul,etcd等

Distributed Application CAP theorem

cap Theorem

Refers in a distributed system, the consistency (Consistency), availability (Availability), fault tolerance partition (Partition tolerance), while three can be obtained

Consistency (C)

All backup data in distributed systems, and whether the same value at the same time. (Data from all nodes at the same time exactly the same, the more nodes, the more time-consuming data synchronization)

Availability (A)

After the load is too large, the entire cluster still be able to read and write in response to client requests. (Service has been available, and is the normal response time)

Fault tolerance partition (P)

Partition tolerance, that is, high availability, a node collapse, does not affect other nodes. (100 nodes, hang a few, does not affect the service, the more the better machine)

CAP theory

That is a distributed storage system, can only achieve the above two points. And because there will be a delay network hardware packet loss and other problems, so we have to partition fault tolerance is needed to achieve. So we can only make trade-offs between consistency and availability.

 

Guess you like

Origin www.cnblogs.com/1234cjq/p/11209832.html