Every time your server needs to look up a domain name, it sends a DNS request to another DNS resolver. If it’s asking for the same domains over and over, those repeated requests still have to travel across the network, even though the answer probably hasn’t changed.
For example, imagine a web application that connects to three external APIs every time someone visits your site. If your server handles thousands of requests a day, it also ends up performing those same DNS lookups thousands of times.
That’s unnecessary network traffic and adds a small delay to every request. A local caching DNS resolver solves this problem by storing recently used DNS records and reusing them until they expire. On Rocky Linux 10, you can set one up with Unbound in about ten minutes.
Unbound is a lightweight, validating, recursive DNS resolver developed by NLnet Labs. Unlike BIND or PowerDNS, it isn’t designed to host DNS zones. Its main job is to resolve DNS queries, cache the results in memory, and return cached answers instantly when the same domain is requested again.