Zones

I assume you remember our discussion about zoning mechanisms available for discovery with Eureka in Chapter 4, Service Discovery. It is useful when the hosts are placed in a different location, and you would prefer communication between instances registered in the same zone. The official documentation of the Spring Cloud Consul (http://cloud.spring.io/spring-cloud-static/spring-cloud-consul/1.2.3.RELEASE/single/spring-cloud-consul.html) says nothing about such a solution, which fortunately doesn't mean it is not implemented. Spring Cloud provides a zoning mechanism based on Consul tags. The default zone for the application may be configured with the spring.cloud.consul.discovery.instanceZone property. It sets the tag configured in the ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.