Consul Connect and service health/tags question

We run a few MySQL servers (3) in a group replication cluster where we ensure that only the master is considered “healthy”; if I add a consul connect proxy to all 3 servers, does the health check of the underlying mysql service also affect the consul connect proxy? I.e. right now our apps just connect to mysql.service.consul (since that always points to the master), but if we have consul connect, would this still work or do I need to start playing with tags?

Hi @benvanstaveren,

Yes, by default the health of the sidecar proxy is dependent on the health of the underlying service in Consul. From

By default we add a TCP check on the local address and port for the proxy, and a service alias check for the parent service.

You should not need to modify tags to ensure that traffic is always redirected to a healthy MySQL instance.

1 Like

Excellent! Works like a charm :slight_smile: