I'm a bit confused with this configuration. My Spring Boot app with @EnableDiscoveryClient
has spring.cloud.consul.host
set to localhost
. I'm running a Consul Agent on the host where my Boot app is running, but I've a few questions (can't seem to find my answers in the documentation).
Can this config accept multiple values?
- If so, I'd prefer to set the values to a list of Consul server addresses (but then, what's the point of running Consul Agents at all, so this doesn't seem practical, which means I'm not understanding something here)
- If not, are we expected to run a Consul Agent on every node a Boot app with
@EnableDiscoveryClient
is running? (this feels wrong as well; for one, this would seem like a single point of failure even though one agent should be able to tell everything about the cluster; what if I can't contact this one agent?) - What's the best practice for this configuration?