Answer the question
In order to leave comments, you need to log in
What is the best way to organize fault tolerance between data centers?
Good afternoon.
There is a certain project for which the most valuable and most frequently changing database is mysql.
The code, for example, rarely changes and is easy to restore.
The task is as follows: you need to organize disaster recovery in such a way as to keep the database in working condition and for transactions - if possible, the latest version, well, or Nm (where N is the main, a fairly large number of existing records in the database, and m is the loss the last few transactions, when the virtual machine with the main system crashed, and the last few requests could not be processed)
There is an idea to make a database on some very fault-tolerant hosting like Amazon, where mysql will always (or almost always) work. And from the virtual machine with the code, from any data centers, wherever I place it, a connection to the Amazon storage will be registered.
And with fast NSs I will switch the entry point to the project, change the A-record for the domain, and later I will automate this switching.
As I see it, the method is not particularly expensive and quite working.
But maybe there is something better?
Answer the question
In order to leave comments, you need to log in
All operating systems implement DNS caching. If there is no way to disable it, then the idea with DNS is most likely a failure. Yes, and depending on how much the cache holds.
For a distributed system, only replication, no cluster will work normally in spaced DCs.
Make a master slave replica and switch to the second server in case of problems.
Cluster with replication - no? Well, instead of MySQL, I would advise you to look towards Postgres.
And with fast NSs I will switch the entry point to the project, change the A-record for the domain, and later I will automate this switching.
According to the fault tolerance of the traffic entry point, for example, you can rent a virtual machine on the same Amazon, and raise nginx on it with proxying traffic to your virtual machines, for renting such a wheelbarrow there will be mere pennies, and it will have many times more availability. You won't have to fence the garden with DNS and you can always lift the stub in case both backends fall.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question