I use HaProxy to forward traffic to a backend server which has a dns name instead of network address:
backend default-backend server external somedomain.com:80
The problem is that there is a situation when it can become not resolvable. In this case HaProxy says:
Server default-backend/external is going DOWN for maintenance (DNS NX status). 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue. backend default-backend has no server available!
I would like HaProxy to check for DNS resolution again and start forwarding traffic whenever target DNS name is resolvable again.
The problem is that I have to declare
resolvers section and at least one
nameserver which can resolve such address like this:
resolvers rslvr nameserver dns0 184.108.40.206:53
What if I do not like to declare any resolvers? I just want HaProxy checked DNS resolution the same way it does on startup. Is it possible?
If I do not use a resolver, backend just stops working and does not check if this domain is available again. Same thing happens when I do not have any
Is there any way to omit explicit
nameserver declaration or maybe use some default resolver used by HaProxy on startup?