I'm using Docker to deploy lots of micro services behind a reverse proxy. I would like to load balance my micro services based on DNS queries and also allow for automated failover and rebalancing once the proxy has started up.
I'm looking for a proxy server which supports load balancing between the returned servers from a DNS query. So for example test.local returns servers 192.168.1.1, 192.168.1.2, 192.168.1.3 and I would like to load balance traffic between them and do some standard reverse proxy rerouting stuff.
Nginx does the DNS query at startup but doesn't do the DNS query periodically and honour the TTL unless you have the Nginx Plus, which is expensive. If I restart my proxy periodically as the servers change then it might work but that would throw bad requests and wouldn't be a good solution.
I've looked to see if this can be done with Apache but I've not found anything.
Any help setting this up would be greatly appreciated as it's the last piece of the puzzle I need to get my servers fault tolerant.