# When does backend do DNS resolution?

**URL:** <https://discourse.haproxy.org/t/when-does-backend-do-dns-resolution/268>\
**Category:** Help!\
**Created:** [May 10, 2016, 9:26pm UTC](https://discourse.haproxy.org/t/when-does-backend-do-dns-resolution/268 "2016-05-10T21:26:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgacote](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/rgacote/32/71_2.png) [@rgacote](https://discourse.haproxy.org/u/rgacote)\
**Post date:** [May 10, 2016, 9:26pm UTC](https://discourse.haproxy.org/t/when-does-backend-do-dns-resolution/268/1 "2016-05-10T21:26:31Z")

</div>

Hello:

I’ve configured a backend server as follows:  
server servername [www.example.com:443](http://www.example.com:443) ca-file /etc/haproxy/GeoTrustSSLCA.crt check-ssl ssl force-tlsv12 verify required verifyhost xyz weight 200 observe layer7 check

When does HAProxy perform the DNS resolution on [www.example.com](http://www.example.com):  
startup (obviously)  
health checks?  
when re-connecting?  
each HTTP request?

The reason we’re using the domain name vs. the IP address is that the service to which we’re connecting says they may change the IP from time to time of both their primary and their backup servers.

Thanks.  
–Ray

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [May 10, 2016, 9:45pm UTC](https://discourse.haproxy.org/t/when-does-backend-do-dns-resolution/268/2 "2016-05-10T21:45:46Z")

</div>

Only at startup (or reload/restart).

That is in the default configuration you are mentioning. However in haproxy 1.6 you can also use the internal resolver. Please read [Server IP address resolution using DNS](https://cbonte.github.io/haproxy-dconv/configuration-1.6.html#5.3).

---

<div class="post-metadata">

**Author:** ![rgacote](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/rgacote/32/71_2.png) [@rgacote](https://discourse.haproxy.org/u/rgacote)\
**Post date:** [May 11, 2016, 1:04am UTC](https://discourse.haproxy.org/t/when-does-backend-do-dns-resolution/268/3 "2016-05-11T01:04:20Z")

</div>

Thanks for that clarification. Definitely looking at the new 1.6 release since SNI just became important to us as well.
