Hello, On Wed, Nov 27, 2019 at 10:25 PM Willy Tarreau <w...@1wt.eu> wrote: > > Hi Marco, > > On Wed, Nov 27, 2019 at 08:38:03AM +0100, Marco Corte wrote: > > Hello! > > > > I see a strange behaviour of the DNS resolution on version 2.0.9 and 2.0.10, > > but I do not know since when this happens. > > > > On Ubuntu 18.04, I set up haproxy to use the local DNS service provided by > > systemd. > > Actually I see that haproxy tries to resolve the names every second. > > The resolution is successful, the TTL in the answer is 1800s or longer. > > It's the interval of your server checks. The resolution is sent at the same > frequency as the checks. The reason is that in environments using dynamic > server addresses, you definitely need to check your address at the same > frequency you care for the server's availability. In addition, in some > fast-recycling environments (AWS used to be like this, I don't know if > it's still the case), when you shut down your server, it was possible that > its IP address was reassigned so fast that the server didn't even have the > time to appear dead, and the traffic could continue to be delivered to > someone else's server! > > If it bothers you (I don't really see why), you can increase the "inter" > value on your servers to check them less often and as such refresh their > address less often.
You can configure "hold valid <time>" to configure internal caching (it should be 10 seconds by default though): https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#5.3.2-hold Lukas