[Reproduced please indicate the source] :Juejin. Cn/post / 684490…

Here is a comparison of the features of the products found in the frequently used services. First of all, we draw a conclusion:

Feature Consul zookeeper etcd euerka
Service health check Service status, memory, hard disk, etc (weak) long connection, keepalive Connect the heart Can match support
Multi-data center support
Kv storage service support support support
consistency raft paxos raft
cap ca cp cp ap
Using interfaces (multilingual capability) Supports HTTP and DNS The client http/grpc HTTP (sidecars)
Watch support Full/Long polling is supported support Support long polling Long polling/ most increments is supported
Their monitoring metrics metrics metrics
security acl /https acl HTTPS support (weak)
Spring cloud integration Have support Have support Have support Have support
  • Health check for Euraka service requires explicit configuration of health check support; While Zookeeper and Etcd are not healthy if they lose Consul’s connection to the server process, Consul is more detailed, such as whether memory has been used up 90% or whether the file system is running out of space.

  • MDC supports Data synchronization across DCS by Consul over the Gossip protocol of WAN. And other products require additional development work to implement;

  • KV storage service Except Eureka, other products can support K-V storage service externally, so we will talk about the important reason why these products pursue high consistency later. And provide storage services, can also be better transformed into dynamic configuration services.

  • The trade-offs of CAP theory in product design Eureka’s typical AP is more suitable as a product of service discovery in distributed scenarios. Service discovery scenarios have high availability priority and consistency is not particularly fatal. Consul, a CA-type scenario, also provides high availability and ensures consistency with the K-V Store service. However, Zookeeper and Etcd sacrifice the availability of CP, which does not have much advantage in service discovery scenarios.

  • Zookeeper provides poor cross-language support. Zookeeper supports HTTP11. Euraka generally provides access support for multilingual clients through sidecar. Etcd also provides support for Grpc. Consul provides DNS support in addition to standard Rest service apis.

  • Support for Watch (client observes service provider changes) Zookeeper supports server-side push changes and Eureka 2.0(in development) is also planned. Eureka 1,Consul and Etcd all realize change perception through long polling.

  • In addition to Zookeeper, other models support metrics by default. Operators can collect and alarm these metrics to achieve monitoring purposes.

  • Secure Consul and Zookeeper support ACL, and Consul and Etcd support SECURE channel HTTPS.

  • Spring Cloud integration currently has a corresponding Boot starter to provide integration capabilities.

In general, the function of Consul itself and the support of Spring Cloud for its integration are relatively complete, and the complexity of operation and maintenance is relatively simple (not discussed in detail). Eureka is designed in line with the scene, but it still needs continuous improvement.

[Reproduced please indicate the source] :Juejin. Cn/post / 684490…