Round robin dns not working correctly

I configured 2 servers in the DNS control panel from doc.
When one of the servers stops, I access the domain and receive a stub page with status code 521.
With any request I get 521 but I need to be transferred to a working server.
How to fix it?

I’m having problem with Round Robin DNS.

I do everything according to this instruction _ttps://

And so.

I have a domain to which I add 2 A records pointing to different servers.

Also, proxying is enabled for each A record.

When I purposely disable 1 server. I expect that the content linked to the domain will remain available. But this does not always happen and often I can get error 521.

I see that Round Robin DNS works in general, but this only applies to new session connections (new clients are distributed approximately evenly across servers). But when 1 of the servers is disconnected, the client who worked with this server through the domain starts receiving error 521!

Please tell me why it doesn’t work? Although the instructions say that everything should be fine!

Thank you for your reply!

Hi there,

You would need to look at using Cloudflare Load balancing for what you are trying to achieve - Cloudflare Load Balancing · Cloudflare Load Balancing docs

DNS round robining does not do health checks to make sure that one server is available and stop sending traffic to it when it becomes unavailable, this is the functionality of load balancing.

There is a feature called Zero Downtime failover, that is discussed here:

Where is you have two DNS records for the same hostname pointing to two different IP’s - it will retry the request to the other server that is available - but there will still always be that failed request to the ‘down’ web server attempting to be made.

The only way to take a failed server out of production and traffic route to a healthy web server is to do health checks on them and that is part of load balancing.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.