Resolver caching
In the context of resolvers, caching is defined as saving and storing information from resolved DNS queries so that the information can be reused. A cache is the area of memory where the information is kept. The primary advantage of caching is the improved performance that is obtained by the elimination of repetitive queries to the name servers.
For example, in the configuration shown in Figure 1, a local caching-only DNS name server is defined to provide some level of resource caching.
In the caching-only name server model depicted in Figure 1, when a request for host.raleigh.ibm.com is received, the resolver contacts the local name server (see arrow 1). The local name server then must perform standard name-server processing to locate the resource, which might include contacting one or more name servers (see arrows 2 through 9). When the name server that can provide an authoritative response for the queried host name is found and the response is returned to the local name server, the local name server caches the information and forwards it back to the resolver (arrow 10).
However, in the caching-only name server model depicted in Figure 1, subsequent requests to the resolver for information about host.raleigh.ibm.com still require that a DNS query be created and forwarded to the local name server to obtain the cached results. This DNS query can be eliminated if the resolver itself caches the information, as shown in Figure 2.
In the resolver caching model, when the initial query of the resolver cache (arrow 1) does not return any host name information, the DNS query is sent to the network name server (arrow 2), which might or might not already have information cached about host.raleigh.ibm.com. When the response is received (arrow 3), the information is cached by the resolver (arrow 4), and subsequent requests for host.raleigh.ibm.com can be satisfied without a DNS query (arrow 4).
Resolver caching is advantageous for the following reasons:
- You do not need to take any steps to enable resolver caching; it is automatically enabled. As shown in Figure 1 and in Figure 2, this eliminates the need to manually configure a local name server to cache the DNS responses.
- The cached information can be used by all applications that are running in the z/OS® logical partition (LPAR), which provides the performance benefits of caching across the entire system for the cost of one DNS query.
- Resolver caching provides high performance because it reduces the network traffic to name servers.
- The resolver automatically regulates your storage use.
- Cached IP addresses can be returned and reordered in a round-robin manner, which provides a balanced way of using cached resources.
If you have been using a caching-only name server and you want to use resolver caching, see Migrating from a local caching-only name server to resolver caching.
You can disable resolver caching for selected applications; for more information, see Steps for disabling caching for selected applications.