Mirroring of the website / MySQL replication?

0 like 0 dislike
I want to have active/passive scheme mirroring of site on Bitriks.

Ie is the main website, and if something happens to it — use a mirror. The mirror is enough to make read-only.

The questions are:

1.Reasonable solution: the database is replicated master-slave standard tools MySQL files from the primary server periodically transferred rsync?

Or is there something better?

2. Is it possible to make the slave database read-only, so users did not have anything new to contribute to the site while repairing the primary server?

3. How does replication, if the master falls off? She will wait until the wizard will work, or will have something to restart with handles?

4. Prompt means for automatically switching to the mirror.
by | 12 views

4 Answers

0 like 0 dislike
0 like 0 dislike
>Prompt means for automatically switching to the mirror.
nginx/upstream — for WEB
0 like 0 dislike
Can be done about this system. But you need at least 2 servers.
We have for example the system works the master-the master, i.e. you can write on 1 server and on the second. When the server comes back online it all sinhroniziruete. But you can master-slave lift and the slave to remove write permissions. If master will lie down it will wait until it rises, synchronized and everything will work.
It is so to say a budget option.
0 like 0 dislike
With the replica MySQL master-slave is fine.
The replica of the files, I would recommend the option of DRBD+OCFS2 habrahabr.ru/blogs/hi/50143/ or in goole lot of information.

Related questions

110,608 questions
257,186 answers
32,807 users