Consul Recommend Deploy Architecture

Hi ! From consul doc, it recommends to deploy odd instances of Consul Server across multiple AZ. And for each consume node, having a consul client agent to communicate with consul server , not directly.

What if one client agent become unavailable? For application that connects to that client agent won’t be able to get services info anymore from consul.

Say i have 5 machine with different ip in PROD environment. And i deploy my application on all 5 machine, each with consul client of course. Is it good to configure my application to connect to all 5 consul client in order to prevent single fail of the consul client ?

The recommended approach is to configure the applications to only communicate with the client agent that resides on the same machine. If that client agent dies, only the services on that machine will be affected.

If the agent is unavailable, Consul will also mark the services as unhealthy in the catalog and will stop routing requests to the instances on that machine so that they do not receive traffic until the agent is restored.

1 Like

Thanks for reply!!. I understand the recommended approach, but I need to find a way to do this myself since my prod service should not fell even if consul client agent dies.