Skip to main content

Round-robin DNS: how DNS load balancing works

Published on November 4, 2026 10 min read

Round-robin DNS spreads traffic across servers by publishing several A records for one name. Learn how it works, with an example, pros and cons.

Illustration of a person turning a turntable with three blank address cards under an orange circular arrow; laptops and phones queue on the left, and the middle of three identical servers on the right is linked by an orange line

Round-robin DNS is a way to spread visitors across several servers by publishing multiple A records (or AAAA records) for one hostname, each with a different IP address. The nameserver returns all the addresses on every lookup, but in a changing order, and most clients connect to the first one. Each server gets a share of the traffic without any extra hardware, but DNS does not check whether a server is actually up.

This article explains what round robin means, how round-robin DNS works with a worked example, how it compares with a load balancer, its pros and cons, and how to set it up and test it.

What does round robin mean?

Round robin means taking turns in a fixed rotation. The term shows up in several fields:

  • Sport: in a round-robin tournament, every competitor plays every other competitor once.
  • Operating systems: round-robin scheduling gives each process a short slice of CPU time in turn.
  • Networking: round-robin load balancing sends each new request to the next server in the list and starts again at the top after the last one.

Round-robin DNS applies that last idea at the DNS level: traffic is distributed while the IP address is being looked up, before a client ever connects to a server.

How does round-robin DNS work?

An A record maps a name to an IPv4 address, and you can publish several A records for the same name, each pointing to a different server. When someone visits your site:

  1. The browser asks a recursive resolver, usually run by the ISP, for the IP address of the name.
  2. The resolver queries your domain's authoritative nameservers, which return all the addresses at once in a varying order.
  3. The resolver caches the whole set for as long as the records' TTL allows and passes it on to the client.
  4. The client connects to the first address in the list. If that fails, many browsers and other clients try the next one.
  5. The next visitor receives the addresses in a different order and lands on a different server.

The technique is old: RFC 1794 described rotating address order on the nameserver to share load back in 1995. It works the same way for IPv6, using multiple AAAA records on one name.

Round-robin DNS example

Say your website runs on three servers with identical content. In your DNS zone you add three A records for the same name:

Example: three A records for www
NameTypeValueTTL
wwwA192.0.2.10300
wwwA192.0.2.11300
wwwA192.0.2.12300

Query the name twice in a row and you get all three addresses both times, in a different order:

dig +short www.example.com @ns1.ljpc.network
192.0.2.11
192.0.2.10
192.0.2.12

dig +short www.example.com @ns1.ljpc.network
192.0.2.12
192.0.2.11
192.0.2.10

The first visitor ends up on 192.0.2.11, the second on 192.0.2.12. On average, each server handles roughly a third of the visitors.

Round-robin DNS vs a load balancer

Load balancing means distributing traffic across multiple servers, and round-robin DNS is its most lightweight form. A load balancer is a separate piece of software or hardware, such as HAProxy or nginx, that receives every request and forwards it to one of the servers behind it. In between sits DNS with health checks, which only hands out the addresses of servers that are currently passing their checks.

Three ways to distribute traffic
Round-robin DNSDNS with health checksLoad balancer
Where traffic is splitAt DNS lookupAt DNS lookupOn every request
Detects a failed serverNoYes, after the check and the TTLYes, at the next check
How even the split isApproximate, because of cachingApproximate, often with weightsPrecise, can follow server load
What you needDNS records onlyA DNS service with health checksAn extra server or service

Advantages of round-robin DNS

  • No extra infrastructure. All you need is DNS records, and every DNS server supports it.
  • Servers can be anywhere. They do not need to share a network or data centre, because traffic is split before any connection is made.
  • Quick to scale. Adding a server means adding an A record; removing one means deleting it.
  • Direct connections. With a load balancer, all traffic passes through one point. With round-robin DNS, each client connects straight to one of the servers.

Disadvantages and limitations

DNS cannot tell whether a server is up

When a server goes down, the nameserver keeps handing out its address. Many browsers will then try the next address, but only after the connection to the first one has failed. If a server does not respond at all, that can take a long time, and the visitor sees a page that keeps loading or an error. Remove the A record of a failed server as soon as you can.

Caching makes the split uneven

Resolvers and clients keep the answer for as long as the TTL allows (see what is DNS cache), and not every resolver shuffles the order. In our test in November 2026 with a domain that has four A records, Google Public DNS (8.8.8.8) and Quad9 (9.9.9.9) returned the addresses in a different order on every query, while Cloudflare (1.1.1.1) returned them in the same order each time. Some operating systems also re-sort the addresses. The distribution is therefore approximate, and a large group of users behind one resolver can end up on the same server for a while.

No awareness of capacity or load

Each server receives roughly the same number of visitors, even if one is twice as powerful or much busier than the others at that moment.

Every server has to be identical

A returning visitor can land on a different server, so your site, uploads and database need to be the same everywhere. If a server keeps logins or shopping carts in local storage only, visitors lose them as soon as they hit another server. Let's Encrypt certificates need attention too: with validation over HTTP, the challenge file has to be available on every server (Let's Encrypt challenge types). For free certificates in general, see Let's Encrypt.

Changes take effect only after the TTL

If you remove a server from the set, caches keep using the old list until the TTL expires. How that works is covered in DNS propagation.

When round-robin DNS is a good fit

Round-robin DNS works well for:

  • several servers serving the same, mostly static content, such as a static website, downloads or a stateless API;
  • servers in different locations, when you want to spread traffic without a central load balancer;
  • services whose client software tries another address when the first one fails.

If your site must stay available the moment a server fails, or you want traffic to follow server load, use a load balancer or DNS with health checks instead.

Alternatives to round-robin DNS

  • A load balancer. Software such as HAProxy or nginx receives all requests, checks the servers and sends each request to a healthy one.
  • DNS with health checks. Services such as Amazon Route 53 (multivalue answer routing, up to eight healthy records per response) and Cloudflare Load Balancing only return addresses of servers that pass their checks.
  • SRV records with weights. For services that use SRV records, such as VoIP, the weight sets each server's share of the traffic. See SRV record explained.
  • MX records with equal priority. Email has round robin built in: under the SMTP standard (RFC 5321), sending servers must pick randomly between MX records with the same priority. See what is an MX record.

How to set up round-robin DNS

  1. Make the servers identical. Every server needs the same site and data, with sessions and uploads available on all of them.
  2. Lower the TTL. A TTL of around 300 seconds lets you take a failed server out of rotation quickly. How to change the TTL is covered in DNS propagation.
  3. Open your domain's DNS management. If your domain comes with a hosting package, you manage records in Plesk, which you open from the customer portal (see open Plesk from the customer portal). With DNS hosting only, you use the customer portal under Services > Domains. Step-by-step screens are in manage DNS records.
  4. Add one A record per server on the same name. Use the same name each time (for example @ for the root domain, or www) with a different server's IPv4 address. If your servers have IPv6, add an AAAA record per server as well. If the name has a CNAME record, as www often does, delete it first: a CNAME cannot coexist with other records on the same name.
  5. Apply the change. In Plesk, click Update above the record list after saving. In the customer portal, Save is all it takes. Changes usually reach our nameservers within a minute.
  6. Test it. Query the name a few times against one of our nameservers, for example with dig +short www.example.com @ns1.ljpc.network, or on Windows with nslookup www.example.com ns1.ljpc.network. You should see every address, in a different order each time. More checks are in troubleshoot DNS problems.

Round-robin DNS at LJPc hosting

  • Our nameservers rotate the order on every query. Publish several A or AAAA records on one name and ns1, ns2 and ns3.ljpc.network return all the addresses, in a different order each time. This works in Plesk and in the customer portal.
  • Your email arrives through two mail servers. With a hosting package, your zone lists mx1.ljpc.email and mx2.ljpc.email, both with priority 10. Sending servers spread your mail across both, and if one cannot be reached, the other takes over. You do not have to configure anything for this.
  • Your domain has three nameservers. If your domain uses our nameservers and a resolver cannot reach one of them, it asks one of the other two.
  • Your hosting package runs on one server. The A record that Plesk creates for your domain already points to it. Do not add extra A records for other servers next to it: visitors sent there will not see your website. Round robin only makes sense once you run the same site on several servers.

If your site outgrows a single server, your own server is a logical next step; see what is a dedicated server. Want to spread your site across multiple servers? Create a support ticket and we will work out the setup that suits your website.

Frequently asked questions

What is round robin?

Round robin means taking turns in a fixed rotation. In IT it is used to distribute tasks or traffic: each request goes to the next server or process in the list, and after the last one the rotation starts again.

Is round-robin DNS the same as load balancing?

It is the most lightweight form of load balancing. Traffic is split when the IP address is looked up. A load balancer handles every request individually, checks whether servers are healthy and can take their current load into account.

Does round-robin DNS provide failover?

Only to a limited extent. DNS keeps handing out the address of a failed server. Many browsers then try the next address, but that can take a long time. For reliable failover, use DNS with health checks or a load balancer.

Why do I keep landing on the same server?

Your device and your resolver cache the answer for as long as the TTL allows, and not every resolver shuffles the order. Some operating systems also re-sort the addresses. Across many visitors the split is roughly even, but not necessarily for a single visitor.

Does round-robin DNS work with IPv6?

Yes. Publish several AAAA records on the same name. If your servers have both IPv4 and IPv6, add an A record and an AAAA record for each server.

Can I use round-robin DNS with LJPc hosting?

Yes. When a name has several A or AAAA records, our nameservers return all the addresses in a varying order. You add the records in Plesk or in the customer portal. A hosting package runs on one server, so round robin makes sense once you run the same site on several servers.

Prefer to talk to someone?

We are also happy to answer your questions personally. Schedule a free consultation or call us directly. We are glad to think along with you.

Stay up to date with recent developments! Subscribe and receive our newsletter Signing up...