Current location - Loan Platform Complete Network - Big data management - How to choose a registration center with distributed architecture?
How to choose a registration center with distributed architecture?
Under the Internet architecture, most systems have been transformed into distributed systems. Among them, service registration discovery center is a very important part of distributed services. It is also particularly important to choose the right registration center on demand.

Eureka is a very important component of SpringCloud family bucket, which mainly realizes service registration and discovery. Eureka implements AP in CAP theory, emphasizing high availability of services. The implementation is divided into Eureka server and Eureka client.

The Eureka client will register as a service in the Eureka registry and update its service lease through heartbeat. At the same time, you can also query the currently registered service information from the server and cache it locally to refresh the service status regularly. If the service cluster has partition failure, Eureka will switch to automatic protection mode, allowing the node with partition failure to continue to provide services; If the partition cannot be restored, other partitions in the cluster will synchronize their status again.

SpringCloud has made a very good integration package for it, and it is the officially recommended registration center.

Zookeeper is a distributed scheduling component in big data Hadoop, which emphasizes data consistency and scalability and can be used for service registration and discovery. She is the default service registration center in dubbo and the most widely used distributed service discovery component at present. Pay attention to CP in CAP theory.

Consul is a highly available distributed service registration center, an open source service tool launched by HashiCorp and implemented by Golang. Consul has its own characteristics in the registration and discovery of distributed services, and the solution is more "one-stop" and no longer needs to rely on other tools.

1. Call API to store key-value pairs through HTTP interface and DNS protocol, which makes service registration and service discovery easier;

2. Support health check, which can quickly alarm the operation in the cluster.

3. Support dynamic configuration of key/value storage.

4. Support any number of regions.

ETCD is a highly available distributed key-value database, which can be used for * * * enjoyment configuration, service registration and discovery. ETCD adopts Raft consistency algorithm and is implemented based on Go language. As a rising star, ETCD has great advantages.

1, an API based on HTTP+JSON, is simple and easy to use;

2. Optional SSL client authentication mechanism is more secure;

3. A single instance supports thousands of write operations per second, which is very fast.

4. Raft consistency algorithm is used to ensure distribution.