When a site outgrows one server, the first idea is to add a second. The simplest way to split visitors between them is DNS: publish several A records for the same name and let each client pick one. This is round-robin DNS. It needs almost no extra software, but its limits are serious, so it is worth knowing exactly when it fits.
How it works
If a zone has several A or AAAA records for one name, the DNS server returns all of them. Many servers and recursive resolvers rotate the order, and clients usually connect to the first address, so visitors end up roughly evenly spread.
shop.example.uz. 300 IN A 203.0.113.11
shop.example.uz. 300 IN A 203.0.113.12
shop.example.uz. 300 IN A 203.0.113.13
for i in 1 2 3; do dig +short A shop.example.uz; echo ---; done
Resolvers cache answers, so the order not changing on every query is normal. Before adding any server to the rotation, open the site directly on that server's IP with the right Host header, for example curl -I -H 'Host: shop.example.uz' http://203.0.113.12/, and make sure it returns the same page as the others.
Distribution, not balancing
DNS knows nothing about server load and does not check whether servers are alive. A weaker server still gets about a third of the traffic. Distribution happens per resolver, not per user: one large mobile operator's resolver may hand the same cached answer to thousands of subscribers. Worst of all, DNS does not drop a dead address. Modern browsers fall back to the next address after a delay of a few seconds, but some apps, mobile SDKs and scripts try only the first one and fail. Round-robin alone does not give you high availability.
TTL and removing a failed server
When a server dies you must remove its record by hand, and how fast that takes effect depends on TTL. With 3600 seconds some resolvers keep serving the old answer for up to an hour, so round-robin records usually use 60 to 300 seconds; 300 is a sensible balance for most sites. Some DNS providers offer health checks that pull failed addresses automatically, often as a paid add-on, and on your own DNS server a monitoring script can remove the record via dynamic update.
Sessions and shared data
One user may hit different servers over time. If sessions live on each server's local disk, people get logged out or lose their cart. Store sessions centrally, for example in Redis, and keep uploads such as product photos in shared storage. The database should be a separate server or a replicated setup; round-robin scales the web tier, not the data tier.
; PHP sessions in Redis (php.ini)
session.save_handler = redis
session.save_path = "tcp://10.0.0.5:6379"
Example: an extra server for a sale
An appliance store in Tashkent expected a big traffic jump during its year-end sale. The administrator cloned the server, moved sessions to Redis, put product images in shared storage, lowered TTL to 300 seconds in advance and added a second A record. After the sale the record was removed and the server shut down. Round-robin was the right tool because the goal was temporary capacity, not perfect balancing.
When you need a real load balancer
If a server failure must be invisible to users, servers differ in capacity, or you want to balance by active connections, put a load balancer in front. It sits on one IP, health-checks backends and removes failed ones immediately.
upstream shop_backend {
least_conn;
server 10.0.0.11 max_fails=3 fail_timeout=30s;
server 10.0.0.12 max_fails=3 fail_timeout=30s;
}
The balancer then becomes a single point of failure, so larger setups run two of them and spread traffic between those with round-robin DNS or a shared virtual IP. The two techniques often work together. Records and TTLs are managed in the DNS section of the sayt.uz cabinet; test each server directly by IP before adding it to the rotation.