R
R
Roman Zakharov2010-11-24 15:32:02
Nginx
Roman Zakharov, 2010-11-24 15:32:02

Redirect to another server if the main one is not available, how?

Rarely, but still, there is such a situation: all sites are on a rented VDS, it may happen that it is not available. Is it possible to make it so that if this happens, the client gets to another server, where he would be told that there are technical problems at the moment?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vladimir Chernyshev, 2010-11-24
@Caman

At the level of the DNS server, this can be solved - the easiest way to give two addresses, some clients, without receiving a response from the first, will turn to the second, but some will not think of it, and some, according to their own understanding, will immediately knock on the second, so it’s more likely not an option for a stub, and for a mirror / replica / cluster, that is, for more or less equal servers (if they are completely equal, then round robin dns or other balancing and / or fault tolerance methods can be used).
Well, the easiest way - when you see that the server is down, and when it gets up is unknown, replace the server IP with a stub IP in the DNS records - after a while all clients will be sent to the stub.

V
Vlad Zhivotnev, 2010-11-24
@inkvizitor68sl

You asked a question, the solution of which in each individual case is fought by specialists with a salary of over 100k rubles.

V
Vlad Zhivotnev, 2010-11-24
@inkvizitor68sl

You asked a question, the solution of which in each individual case is fought by specialists with a salary of over 100k rubles.

S
Sergey, 2010-11-24
@bondbig

only if there is an "intermediary" between this your VDS and clients. For example, a reverse proxy (nginx, lighttpd, varnish, etc.), or a balancer hardware (cisco ace, crescendo, f5, citrix, etc.), which can determine that the backend is down and redirect traffic somewhere. As a rule on a reserve server. But here the point of failure will be this node. Further - only by means of BGP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question