> OctoPerf load testing - DNS documentation page. How to configure the User Profiles behavior with DNS.

Source: https://api.octoperf.com/doc/runtime/edit-scenario/edit-user-profile/options/dns/

# DNS

![User Profile DNS](https://api.octoperf.com/doc/runtime/edit-scenario/edit-user-profile/img/user-profile-dns.png "User Profile DNS")

By default the underlying [Java Virtual Machine](https://en.wikipedia.org/wiki/Java_virtual_machine) will only call the [DNS](https://en.wikipedia.org/wiki/Domain_Name_System) server every once in a while and keep the IP associated with the DNS in its cache.
Real users on the other hand will call the DNS when they first connect.
You might need to emulate this behavior by clearing the DNS cache of the JVM every time a virtual user does a new iteration.
In particular when when load testing a website behind a [CDN](https://fr.wikipedia.org/wiki/Content_delivery_network) (Content Delivery Network) or several load balancers (like [AWS Elastic Load Balancer](https://aws.amazon.com/elasticloadbalancing/)), since they tend to load balance users by changing the DNS on the fly.

* **Clear dns cache on each iteration**: when *true*, the virtual user resolves the server IP behind the domain 
on each iteration,
* **Custom servers**: when any defined, overrides the system default DNS server.
* **Static Hosts**: to override IPs (right column) associated to host names (left column).

!!! info
    If you need to override IPs associated to host names you can also upload a `hosts` file in the [files manager](https://api.octoperf.com/doc/design/edit-virtual-user/configuration/files/)

!!! info
    These settings apply to JMeter virtual users. A user profile running a K6 Virtual User resolves hostnames the way K6 does, set in its [Network](https://api.octoperf.com/doc/runtime/edit-scenario/edit-user-profile/options/k6/#network) panel: cache TTL, address selection and IP family.
