{"id":5539,"date":"2026-05-24T19:24:34","date_gmt":"2026-05-24T23:24:34","guid":{"rendered":"https:\/\/dft.wiki\/?p=5539"},"modified":"2026-06-08T09:39:45","modified_gmt":"2026-06-08T13:39:45","slug":"resilient-nameserver-infrastructure-the-architecture","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=5539","title":{"rendered":"Resilient Nameserver Infrastructure &#8211; The Architecture"},"content":{"rendered":"<p>In a previous post, the foundation for the basic concepts of two scenarios was laid. See <strong>Resilient Nameserver Infrastructure &#8211; The Tools<\/strong> [<a href=\"https:\/\/dft.wiki\/?p=5517\">Link<\/a>].<\/p>\n<p>In this post, the same tools will be used, along with additional concepts, to accomplish a geographically fault-tolerant and highly available service across multiple architectural designs.<\/p>\n<p>For the comparison and illustration of the architectural designs, 4 layers will be assembled.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5541\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-02.png\" alt=\"\" width=\"431\" height=\"110\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-02.png 431w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-02-300x77.png 300w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/p>\n<hr \/>\n<p><strong>IP ROUTING<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5549\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-01.png\" alt=\"\" width=\"538\" height=\"111\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-01.png 538w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-01-300x62.png 300w\" sizes=\"auto, (max-width: 538px) 100vw, 538px\" \/><\/p>\n<ul>\n<li><strong>Unicast<\/strong>\n<ul>\n<li>Pros\n<ul>\n<li>Simpler to deploy, manage, and troubleshoot.<\/li>\n<li>Each IP address maps to a single server or location.<\/li>\n<\/ul>\n<\/li>\n<li>Cons\n<ul>\n<li>Offers lower resiliency and scalability.<\/li>\n<li>Higher susceptibility to latency issues, outages, and DoS attacks.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Anycast<\/strong>\n<ul>\n<li>Pros\n<ul>\n<li>Advertises the same IP address from multiple geographically distributed locations.<\/li>\n<li>Improves latency, availability, and DoS resistance.<\/li>\n<\/ul>\n<\/li>\n<li>Cons\n<ul>\n<li>Increased operational complexity in routing, monitoring, and troubleshooting.<\/li>\n<li><span style=\"font-size: 1rem;\">Requires a consistent synchronization strategy across distributed nodes.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5544\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-23_16-03-38.png\" alt=\"\" width=\"719\" height=\"446\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-23_16-03-38.png 719w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-23_16-03-38-300x186.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p><strong>Reflections<\/strong><\/p>\n<ul>\n<li>While not entirely predictable, it is reasonable to assume that each of the geographically distributed servers (see map above) may:\n<ul>\n<li>For unicast:\n<ul>\n<li>Each server serves roughly 1\/3 of the globe with the lowest latency consistently (see the circles in the map).<\/li>\n<\/ul>\n<\/li>\n<li>For anycast:\n<ul>\n<li>Each request, regardless of origin, may be served with the lowest latency only 1\/3 of the time, and the highest latency also 1\/3 of the time.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>The best option depends entirely on business requirements.\n<ul>\n<li>Does the business serve globally? Go anycast.<\/li>\n<li>Does the business serve regionally? Go either unicast or anycast in a less spread-out fashion (see image below).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5545\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-23_16-31-32.png\" alt=\"\" width=\"718\" height=\"447\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-23_16-31-32.png 718w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-23_16-31-32-300x187.png 300w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/p>\n<hr \/>\n<p><strong>TRAFFIC HANDLING<\/strong><\/p>\n<p>Incoming traffic is one of the largest attack surfaces and also offers the greatest opportunities for improving scalability.<\/p>\n<p>The edge is where the first layer of defense happens. Here are things to consider when designing how traffic is handled at the edge.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5552\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-02-1.png\" alt=\"\" width=\"529\" height=\"157\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-02-1.png 529w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-02-1-300x89.png 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><\/p>\n<ul>\n<li>Use security groups to allow only ports 53 UDP\/TCP at the edge router.<\/li>\n<li>While firewalls (routers) often claim to provide DoS and DDoS protection, this is not recommended when combined with a DNS-aware proxy.<\/li>\n<li>A DNS-aware proxy, such as <strong>PowerDNS DNSDist<\/strong>, is capable of:\n<ul>\n<li>Filtering and dropping maliciously crafted packets.<\/li>\n<li>Throttling abusive clients and blocking enumeration attempts.<\/li>\n<li>Balancing requests across a pool of servers.<\/li>\n<li>No more than 1 proxy per IP for proper rate-limit calculation and throttling.<\/li>\n<\/ul>\n<\/li>\n<li>A caching DNS resolver, such as <strong>PowerDNS Recursor<\/strong>, provides the following benefits:\n<ul>\n<li>Acts as a capacity multiplier for authoritative servers, reducing the number of required backend instances.<\/li>\n<li>Cache hits are computationally cheaper than full resolution and deliver extremely low-latency responses.<\/li>\n<li>\n<p>Protects the backend database and significantly reduces its overhead.<\/p>\n<\/li>\n<li>With at least one resolver per proxy, but all part of the same pool, they can serve all proxies.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Reflections<\/strong><\/p>\n<ul>\n<li>The traffic handling layer must do the heavy lifting, serving tens of thousands of requests per second, and only forwarding legitimate and unique requests to the authoritative nameserver.<\/li>\n<li>Both proxies and resolvers are essentially ephemeral (stateless) and can be destroyed and redeployed one at a time with no operational impact.<\/li>\n<\/ul>\n<hr \/>\n<p><strong>HIGH AVAILABILITY<\/strong><\/p>\n<p>While the first layer defines how the DNS service behaves globally or regionally, and the second layer defines how robust the service is, the third layer is where the computing happens to respond to each request.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5555\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-03.png\" alt=\"\" width=\"439\" height=\"153\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-03.png 439w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-03-300x105.png 300w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/p>\n<ul>\n<li>For small environments:\n<ul>\n<li>Each authoritative nameserver can be self-sufficient per point of presence.<\/li>\n<li>When using Bind9 files or SQLite, AXFR\/IXFR must be used to replicate (sync) changes across instances.<\/li>\n<li>Advanced features cannot be replicated if not covered by RFC-1995 and RFC-5936.<\/li>\n<li>A primary vs. secondary hierarchy must be configured at the authoritative level.<\/li>\n<\/ul>\n<\/li>\n<li>For larger environments:\n<ul>\n<li>Each geographic point of presence should have at least 2 instances of the authoritative nameserver.<\/li>\n<li>Synchronization is delegated to the backend, leaving the nameservers stateless and ephemeral.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Since the nameserver is tightly coupled with its backend, more on high availability is covered in the backend layer below.<\/p>\n<hr \/>\n<p><strong>BACKEND STRATEGIES<\/strong><\/p>\n<p>This is where modern DNS features shine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5559\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-04-1-1.png\" alt=\"\" width=\"439\" height=\"366\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-04-1-1.png 439w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-04-1-1-300x250.png 300w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/p>\n<ul>\n<li>AXFR (Zone Transfer Protocol) and IXFR (Incremental Zone Transfer)\n<ul>\n<li>While still in use, it does not cover modern features.<\/li>\n<li>It relies on DNS Notify (RFC-1996) for faster propagation of changes.<\/li>\n<li>In 2021, Zone Transfer over TLS (RFC-9103) was introduced to offer encrypted transfers.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5561\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-04-2.png\" alt=\"\" width=\"519\" height=\"385\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-04-2.png 519w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-layer-04-2-300x223.png 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/p>\n<ul>\n<li>Database-Level Replication\n<ul>\n<li>Near event-driven replication is achieved with synchronous or semi-synchronous replication.<\/li>\n<li>Nameservers no longer communicate with each other; there is no concept of primary\/secondary among them.<\/li>\n<li>Because state is managed at the database level, all nameservers behave as primary.<\/li>\n<li>All features of the nameserver are replicated, along with zones and records.<\/li>\n<li>Bridges and tunnels are used to provide internal communication for replication.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Modern tools, such as <strong>PowerDNS Authoritative Server<\/strong>, offer a variety of backend options. MySQL\/MariaDB and PostgreSQL are among the most popular.<\/p>\n<p>For geographically dispersed servers, data synchronization is done through some form of replication. While not atomic, changes can propagate in under a second. Externally cached responses will only reflect changes once they expire based on their defined TTL (Time-To-Live).<\/p>\n<p><strong>Note:<\/strong> The topic of how to cluster and replicate databases is outside the scope of this post. See <strong>MySQL Database Replication<\/strong> [<a href=\"https:\/\/dft.wiki\/?p=609\">Link<\/a>].<\/p>\n<hr \/>\n<p><strong>PROPOSED DESIGNS<\/strong><\/p>\n<p><strong>Simplified Classical Architecture<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5563\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-25_10-27-14.png\" alt=\"\" width=\"720\" height=\"450\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-25_10-27-14.png 720w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-25_10-27-14-300x188.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/p>\n<ul>\n<li>Unicast\n<ul>\n<li>ns1.example.com 100.1.1.10<\/li>\n<li>ns2.example.com 100.1.1.20<\/li>\n<li>ns3.example.com 100.1.1.30<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5567\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-1-1.png\" alt=\"\" width=\"585\" height=\"586\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-1-1.png 585w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-1-1-300x300.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-1-1-150x150.png 150w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/p>\n<ul>\n<li>This simplified design has only 1 entry point (public IP) per point of presence.\n<ul>\n<li>Using a virtual IP, a failover proxy can take the load if the primary fails.<\/li>\n<li>Alternatively, the single proxy can act as the fuse (sacrificial element) that protects the rest of the infrastructure from attacks.<\/li>\n<\/ul>\n<\/li>\n<li>With only 2 resolvers in the pool, a large number of requests can be served.\n<ul>\n<li>This is the first scaling point when load increases.<\/li>\n<\/ul>\n<\/li>\n<li>It is recommended to have at least 2 instances of the nameserver.<\/li>\n<li>The choice of backend and its level of resilience (number of instances) depends on the organization&#8217;s requirements.<\/li>\n<\/ul>\n<p><strong>Optimized Architecture<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5564\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-25_10-27-40.png\" alt=\"\" width=\"722\" height=\"446\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-25_10-27-40.png 722w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/Screenshot_2026-05-25_10-27-40-300x185.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/p>\n<ul>\n<li>Anycast\n<ul>\n<li>ns1.example.com 100.1.1.10<\/li>\n<li>ns2.example.com 100.1.1.20<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5568\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-2-1.png\" alt=\"\" width=\"636\" height=\"605\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-2-1.png 636w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-2-1-300x285.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<ul>\n<li>This proposed design has only 2 entry points (public IPs) per point of presence.\n<ul>\n<li>Optionally, each proxy can have a failover instance using a virtual IP. Recommended for large environments.<\/li>\n<\/ul>\n<\/li>\n<li>Size the number of resolvers in the pool according to the expected load.<\/li>\n<li>Start with at least 3 instances of the nameserver per point of presence, then scale up and\/or out as needed.<\/li>\n<li>This design calls for nothing less than a PostgreSQL or MySQL\/MariaDB cluster:\n<ul>\n<li>The cluster size should be 3\u20135 nodes for an appropriate quorum.<\/li>\n<li>Consider using a DB proxy to distribute the load across nodes.<\/li>\n<li>Prefer querying all nodes for read-only operations.<\/li>\n<li>Asynchronous replication between clusters is acceptable.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<p><strong>BONUS<\/strong><\/p>\n<p>Conceptually, a &#8220;poor man&#8217;s&#8221; design could achieve remarkable performance with less complexity and lower cost, at the expense of reliability.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5570\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-3.png\" alt=\"\" width=\"691\" height=\"471\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-3.png 691w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2026\/05\/PowerDNS-proposal-3-300x204.png 300w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/p>\n<ul>\n<li>Ideally deployed as anycast, though unicast may be more feasible in this case.<\/li>\n<li>It has a clear single point of failure at the main point of presence, but:\n<ul>\n<li>This design spreads caches across different data centres in geographically distant locations.<\/li>\n<li>Resolvers will continue to respond with cached results during an eventual outage of the authoritative servers.<\/li>\n<li>The longer the TTL of cached records, the longer an outage can occur without users noticing.<\/li>\n<\/ul>\n<\/li>\n<li>No replication or synchronization of changes is needed.<\/li>\n<li>Any backend strategy is suitable.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In a previous post, the foundation for the basic concepts of two scenarios was laid. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5539","post","type-post","status-publish","format-standard","hentry","category-ccna"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/5539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5539"}],"version-history":[{"count":18,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/5539\/revisions"}],"predecessor-version":[{"id":5603,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/5539\/revisions\/5603"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}