3

For Eureka, services can register themselves to Eureka server directly. Why should we send request to Consul client instead of Consul server? Are there any problems to let services communicate with Consul server directly?

Appreciate your help, thanks!

Neo
  • 2,196
  • 5
  • 32
  • 58

1 Answers1

0

No, there is no problem in communicating directly to the servers.

Consul clients are used in big data centers with many (5+) Consul agents. The Consul developers recommend to use three to five server agents per datacenter. If you need more agents (for hundreds of micro services e.g.) than you should use client agents that are connected to server agents instead of launching more server agents which will decrease performance.

But in a smaller datacenter there is no problem using server agents directly.

Milgo
  • 2,617
  • 4
  • 22
  • 37
  • If I have hundreds of micro-services, I can also let these services send request to Consul Server Agent directly. So there is no need to deploy one client agent per service(instance) – Neo Aug 14 '19 at 07:28