O
O
Optimus2016-04-09 16:47:47
High availability
Optimus, 2016-04-09 16:47:47

How to make a website highly available?

There is a small site with high accessibility requirements. Let's say I take VDS in two different data centers, I raise copies on them, the base is a replica.
What's next? How exactly to ensure immediate switching to another server if the first one is unavailable? DNS change is not an option, as I understand it. DNS switching time is 2-8 hours, during this time the non-working VDS will lie down and rise for a long time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
viiy, 2016-04-09
Pyan @marrk2

There are several ways to do this.
First. Provide high availability to a service that was not designed for this. When web servers do not have balancers, when mysql was conceived as one, when applications are in one instance. As already mentioned - use the services of amazon. Elastic ip for switching between servers, RDS (mysql) with multi-az, elastic storage for the file system.
The second, the most difficult, but correct. Change the architecture of the service. Web servers as a separate part must balance requests between the backend part. The application should be able to switch between mysql databases if one server has crashed. Mysql replication between remote data centers is a pain and suffering, ideally it should be only for backup. If you don't already have Mysql replication, use percona xtradb cluster. Contact not directly to it, but through haproxy, in which you need to configure checking the status of replicas.
In short, all layers must have at least one redundancy. At the IP level, use the services of a data center.

K
KkJ, 2016-04-09
@KkJ

In DNS, you can specify multiple addresses at once. If the site is read-only, that's enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question