I rent some Linux servers and the hosting company provides a set of eight DNS resolvers.
The response speed varies from resolver to resolver and I periodically modify /etc/resolv.conf
to get the best performance.
On two occasions I found one of my public websites was taking far too long to load and this was, in part, related to it depending on backend web services that were taking around 15s to resolve a domain to an IP.
To ensure the most responsive resolvers are always specified, I'd like to automate the process of modifying /etc/resolv.conf
.
I can script it if need be, however that would inevitably feature an obscure bug and I want to minimise the risk of an automated process making a mess of /etc/resolv.conf
. Any pre-existing solution that has been tested for a long time and shown to be stable will be more reliable than my own solution.
I'm interested in knowing if anyone has tackled this type of problem before and whether there are any stable scripts/processes/methods for handling this.