Service Discovery Comparison: Consul vs Zookeeper vs Etcd vs Eureka

Here is a comparison of the characteristics of the products that are often used in service discovery. First, let’s look at the conclusion:



the health check of the service
Euraka needs to be explicitly configured for health check support; Zookeeper and Etcd lose the connection with the service process The next task is unhealthy, and Consul is relatively more detailed, such as whether the memory has been used by 90%, and whether the space of the file system is running out.

Multiple data centers support
Consul through WAN's Gossip protocol to complete synchronization across data centers; and other products require additional development work to achieve;

KV storage services
In addition to Eureka, several other models can support kv storage services externally, so The important reasons why these products pursue high consistency will be discussed later. The provision of storage services can also be better transformed into dynamic configuration services.

The choice of CAP theory in product design
Eureka's typical AP is more suitable as a product for service discovery in distributed scenarios. Service discovery scenarios have higher availability priority, and consistency is not particularly fatal. Secondly, in the CA type of scenario Consul, it can also provide high availability and ensure the consistency of the kv store service. Zookeeper and Etcd are CP types that sacrifice availability and do not have much advantage in service discovery scenarios;

multi-language capability and access protocol for external services,
Zookeeper's cross-language support is weak, and several other models support http11 to provide access. . Euraka generally provides access support for multilingual clients through sidecars. Etcd also provides Grpc support. In addition to the standard Rest service API, Consul also provides DNS support.

Watch support (clients observe service provider changes)
Zookeeper supports server-side push changes, and Eureka 2.0 (in development) is also planned to support it. Eureka 1, Consul, and Etcd all realize the perception of changes through long polling;

the monitoring of their own clusters
In addition to Zookeeper, several other models support metrics by default, and operators can collect and alert these metrics to achieve monitoring purposes;

security
Consul and Zookeeper support ACL, and Consul and Etcd support secure channel https.

The integration of Spring Cloud
currently has a corresponding boot starter, which provides integration capabilities.

In general, at present, Consul's own functions and spring cloud's support for its integration are relatively complete, and the complexity of operation and maintenance is relatively simple (no detailed discussion is listed). Eureka's design is more in line with the scene, but it needs to continue of perfection.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326348662&siteId=291194637