Switching Masters During Failover-opracowanie

Nasza ocena:

3
Wyświetleń: 378
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Switching Masters During Failover-opracowanie - strona 1

Fragment notatki:

Switching Masters During Failover
There is currently no official solution for providing failover between master and slaves in the event
of a failure. With the currently available features, you would have to set up a master and a slave (or
several slaves), and to write a script that monitors the master to check whether it is up. Then instruct
your applications and the slaves to change master in case of failure.
Remember that you can tell a slave to change its master at any time, using the CHANGE MASTER TO
statement. The slave will not check whether the databases on the master are compatible with the
slave, it will just start reading and executing events from the specified binary log coordinates on the
new master. In a failover situation, all the servers in the group are typically executing the same events
from the same binary log file, so changing the source of the events should not affect the database
structure or integrity providing you are careful.
Run your slaves with the --log-bin [2039] option and without --log-slave-updates [2004]. In
this way, the slave is ready to become a master as soon as you issue STOP SLAVE; RESET MASTER,
and CHANGE MASTER TO statement on the other slaves. For example, assume that you have the
structure shown in Figure 16.4, “Redundancy Using Replication, Initial Structure”.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz