Moment For Technology

【 Similarities and Differences between Consul, Eureka and Nacos 】

Posted on Aug. 8, 2022, 6:28 p.m. by Tracy Cooper
Category: The back-end Tag: The back-end java

Configuration center

  • Eureka is not supported
  • Consul supports, but is cumbersome to use and does not fit the naming style of the springBoot framework. Dynamic refresh is supported
  • Nacos support, easy to use, consistent with the naming style of springBoot, support dynamic refresh

The registry

1. Eureka:

  • In-app/out-app: Integrated directly into applications and depends on applications to register and discover services
  • ACP principle: Follow AP (Availability + separation tolerance) principle, have strong availability, service register fast, but sacrifice some consistency.
  • Version iteration: Currently, no upgrade is performed
  • Integration support: only SpringCloud integration is supported
  • Access protocol: HTTP Avalanche protection: Avalanche protection is supported
  • Interface: English interface, not in line with the people used to start: easy
  1. Consul:
  • In-application/out-application: belongs to the external application, less invasive
  • ACP principle: Service registration is slow following CP principle (consistency + separation tolerance). Due to its consistency, the real Consul is unavailable during a re-election if the Leader fails.
  • Version iteration: Version iteration is still going on
  • Integration support: Support for SpringCloud K8S integration
  • Access protocol: HTTP/DNS
  • Avalanche protection: Avalanche protection is not supported
  • Interface: English interface, not in line with people's habits
  • Getting started: Get complicated
  1. Nacos:
  • In-application/out-application: belongs to the external application, less invasive
  • ACP Principles: Advice follows CP principles (conformance + separation tolerance) and AP principles (availability + separation tolerance)
  • Version iteration: Version iteration is still going on
  • Integration support: Support Dubbo, SpringCloud, K8S integration
  • Access protocol: HTTP/ dynamic DNS/UDP
  • Avalanche protection: Avalanche protection is supported
  • Interface: Chinese interface, in line with people's habits
  • Getting started: easy, Chinese documents, cases, active community

Functional differences

The module Nacos Eureka instructions
The registry is is Basic functions of service governance, responsible for service centralization registration
Configuration center is no Eureka needs to cooperate with Config to realize the configuration center and does not provide a management interface
Dynamic refresh is no Eureka needs to work with MQ to achieve dynamic configuration refresh, while Nacos uses Netty to maintain real-time push of TCP long connection
Available area AZ is is Service clusters are divided into regions to isolate regions and provide automatic Dr Switchover
grouping is no Nacos can be managed in groups based on business and environment
metadata is is Provide service label data, such as environment or service identification
The weight is no Nacos provides the weight setting function by default to adjust the load pressure
Health check is is Nacos supports client-initiated or server-initiated health checks, while Eureka is client-initiated heartbeat checks
Load balancing is no Both provide responsible balancing strategies, while Eureka adopts Ribion
Management interface is no While Nacos supports online management of services, Eureka merely previews service status

The deployment of installation

The module Nacos Eureka instructions
MySql is no Nacos requires MySql to persist data
MQ no is Eureka requires MQ for configuration center refresh
Dynamic refresh is no Eureka needs to work with MQ to achieve dynamic configuration refresh, while Nacos uses Netty to maintain real-time push of TCP long connection
Configuration center is no Eureka implements the configuration center in combination with Config or Consul
The configuration file Online editing Local files or Git remote files Eureka with Config or Consul
The cluster is is You need to configure the cluster IP address before starting Nacos

Stability and scalability

The module Nacos Eureka instructions
version 1.0.0 1.9.9 Eureka2.0 development has been stopped,Nacos is in 1.x-2.0 development
vendor alibaba Netflix Netflix has been in production for a long time. Alibaba is just getting started
Production of advice no is Nacos0.8 is not available for production before, so it is recommended to use Nacos1.0 for production to save configuration of central cluster and service management
The future development is no Nacos 2.0 focuses on the construction of an open service platform with a unified service management, service sharing and service governance system
### Selection suggestions
  • Considerations for adopting Eureka scheme:
  • Want to use the Spring Cloud native family bucket
  • If you want to use local files and Git for configuration management, manage configuration and services separately
  • Consider short-term stability
  • Considerations for Nacos scheme:
  • You want to go online and manage traffic
  • You don't want to use MQ for dynamic refresh of the configuration center
  • Do not want to add a production cluster in the configuration center
  • Consider introducing the Spring Cloud Alibaba ecosystem
Search
About
mo4tech.com (Moment For Technology) is a global community with thousands techies from across the global hang out!Passionate technologists, be it gadget freaks, tech enthusiasts, coders, technopreneurs, or CIOs, you would find them all here.