I have huge app in Kubernetes with about 90 containers on 5 k8s worker nodes. Nodes are spread between Availability Zones in AWS, like that:
node1 - AZ-A
node2 - AZ-A
node3 - AZ-B
node4 - AZ-B
node5 - AZ-C
Also I got many small apps which use API from that huge app. All apps use external/public host of that app, so actually all traffic between apps goes through ELB.
I can use internal kubernetes hostnames like “api.api_namespace.svc.cluster.local” (now we got coreDNS), but I would like to avoid cross-zone traffic, so how can I implement consul to be AZ aware and prefer traffic between pods in the same AZ, e.g.
Something similar but with HAProxy and Redis: