🏠 home 📓 lab notes 🛠 stack 📖 runbooks ~$ whoami

Building a Resilient Technitium DNS Cluster: Zone Replication & Automatic Failover

DNS is one of those services you rarely think about—until it stops working. When your DNS server becomes unavailable, every device on your network suddenly struggles to find websites, services, and even other local machines.

In this guide, we’ll transform a single Technitium DNS Server into a resilient, highly available DNS platform using two servers. By combining Technitium’s built-in cluster replication with Keepalived’s automatic failover, you’ll create a setup that continues serving DNS even if one server unexpectedly goes offline.


Why Build a DNS Cluster?

Running a single DNS server creates a single point of failure. Even if your server is extremely reliable, hardware failures, maintenance, updates, or power outages can leave your entire network without name resolution.

A high-availability deployment solves this problem by using two independent components working together.

The first is cluster replication, which keeps DNS zones synchronized between multiple Technitium servers. Every record you create or modify is automatically replicated so both servers always contain identical DNS data.

The second is automatic failover using a floating Virtual IP (VIP). Instead of clients knowing about two different DNS servers, every device simply points to one IP address. If the primary server becomes unavailable, the secondary automatically assumes ownership of that IP address and continues answering DNS requests without requiring any client changes.

Neither feature is sufficient on its own. Replication ensures both servers contain the same information, while failover ensures clients always reach a healthy server.


Creating the Cluster

The process begins by configuring one server as the primary cluster member.

Within the Technitium administration interface, create a new cluster and assign it a descriptive name. During this step, the server registers itself as the initial cluster node.

Next, move to your secondary DNS server and choose the option to join an existing cluster. You’ll provide the address of the primary server along with administrative credentials so the secondary can securely join.

Depending on your environment, you may temporarily allow self-signed certificates during the initial connection. Once both systems communicate successfully, the secondary server appears in the cluster management page, confirming that both nodes recognize each other and are ready to synchronize.

Before continuing, verify that both servers report a healthy status and can communicate without firewall restrictions.


Zone Replication

With the cluster established, Technitium begins synchronizing DNS data between both nodes.

Whenever a DNS zone is created or modified on the primary server, the changes are automatically replicated to the secondary. This includes new host records, aliases, TXT records, MX records, and virtually every other zone modification.

It’s worth verifying that all of your important zones are participating in replication. If certain zones existed before clustering was configured, they may require a quick save or synchronization before becoming fully replicated.

A good practice is to make a small DNS change on the primary server and confirm that the same change appears on the secondary within a few moments.

Once replication is functioning correctly, both servers are capable of providing identical DNS responses.


Automatic Failover with Keepalived

Although replication keeps the DNS data synchronized, clients still need a single destination for their DNS requests.

This is where Keepalived enters the picture.

Keepalived uses the Virtual Router Redundancy Protocol (VRRP) to create a floating Virtual IP address shared between both DNS servers. At any given time, one server owns the VIP while the other remains on standby.

Every client, router, DHCP server, and network device simply uses this Virtual IP as its DNS server.

If the primary node becomes unavailable because of maintenance, hardware failure, or a system crash, Keepalived automatically transfers ownership of the Virtual IP to the secondary server. From the perspective of your clients, nothing changes—they continue sending DNS requests to the exact same IP address.

Once the primary server returns online, it can either reclaim ownership of the Virtual IP or remain as the standby node, depending on your preferred failover behavior.

This entire process happens automatically and typically completes within only a few seconds.


Testing the Setup

High availability should never be considered complete until it has been tested.

Begin by confirming that clients successfully resolve DNS using the Virtual IP instead of either server’s individual address.

Next, simulate a failure by shutting down the primary DNS server or disconnecting it from the network. Within moments, the secondary server should assume ownership of the Virtual IP.

While the failover occurs, continue performing DNS lookups from another device. Name resolution should continue without interruption.

Finally, restore the primary server and verify that the cluster returns to its expected operating state while maintaining synchronized DNS data.

Testing these scenarios before relying on the cluster in production provides confidence that failover will work when it’s actually needed.


Benefits of This Setup

Combining Technitium’s clustering capabilities with Keepalived provides several advantages:

  • Elimination of a single point of failure.
  • Automatic synchronization of DNS zones.
  • Seamless client failover through a floating Virtual IP.
  • Simplified DNS configuration across your network.
  • Minimal downtime during maintenance or unexpected outages.
  • A scalable foundation for larger homelab or self-hosted environments.

Final Thoughts

DNS is one of the foundational services every network depends on, yet it’s often overlooked until something goes wrong.

By deploying two Technitium DNS servers with cluster replication and automatic failover, you create a resilient infrastructure capable of surviving server outages with little to no impact on your users.

The initial setup requires only a bit more effort than a standalone installation, but the reward is a highly available DNS platform that quietly does its job—even when one of your servers doesn’t.