Re:“Let’s use Kubernetes.” Now you have eight problems
by hinkley on Thursday March 05, 2020 @04:31PM
(#22498542)
You're talking about layering the thing on top of Consul that I already identified in my top level comment.
Consul itself advertises DNS resolution for service discovery.
Re:“Let’s use Kubernetes.” Now you have eight problems
by notyourday on Thursday March 05, 2020 @05:07PM
(#22498869)
Maybe I was not clear.
Whatever is the technology that you use to register the active backends in the DNS, rather than doing name => ip address lookup per request, you can resolve all those names => ip address maps upon the service being brought up/taken down and push the resolved map as a set of backends into nginx config, thus removing the need to query DNS per request.
Round-robin balancing using DNS towards a small cluster is silly - you know when any new instance is added to the pool or removed from a pool, so why not push that load balancing onto the load balancer which in your case is nginx?