---
title: DNS caching
description: You can use two global configuration properties to control the caching of host name-to-numeric IP address or DNS lookup results returned from the name resolution services of the underlying operating system.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_dns_caching
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_dns_caching.html
revdate: July 5, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
---

# DNS caching

You can use two global configuration properties to control the caching of host name-to-numeric IP address or DNS lookup results returned from the name resolution services of the underlying operating system.

## About this task

## Steps

1. To configure these properties, use the `dsconfig` tool.

   **Global configuration properties and their descriptions**

   | Global configuration property        | Description                                                                                                                                                                                                                                                                                                                                                                                                                  |
   | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | network-address-cache-ttl            | Sets the Java system property `networkaddress.cache.ttl`, and controls the length of time in seconds that a host name-to-IP address mapping can be cached. By default, it keeps resolution results for one hour (3600 seconds). This setting applies to the server and all extensions loaded by the server.                                                                                                                  |
   | network-address-outage-cache-enabled | Caches host name-to-IP address results in the event of a DNS outage. By default, this is set to true, meaning name resolution results are cached. Unexpected service interruptions might occur during planned or unplanned maintenance, network outages, or an infrastructure attack. This cache can allow the server to function during a DNS outage with minimal impact. This cache is not available to server extensions. |

2. To reduce delays caused by unnecessary DNS lookups, follow these recommendations:

   1. Maintain a connection pool in the client app rather than opening new connections for each bind.

   2. Add appropriate records to DNS, including PTR records.

   3. Add `options timeout:1` or `options single-request` in the `/etc/resolv.conf` file.

   4. If IPv6 requests are causing issues, add `-Djava.net.preferIPv4Stack=true` to the `start-server.java-args` line in server's `config/java.properties` file, so that running `bin/dsjavaproperties` and restarting the server no longer issues IPv6 PTR requests.
