Mysql Replication Semi Sync 구축하기
Mysql Replication Semi Sync 를 구축해보자.
기본 준비 상황
master DB server 1대
slave DB server 1대
replication은 동작중인 상태 를 가정한다.
<<<마스터 설정>>>
> install plugin rpl_semi_sync_master soname 'semisync_master.so';
> set global rpl_semi_sync_master_enabled = 1;
> set global rpl_semi_sync_master_timeout = 10000;
> install plugin rpl_semi_sync_slave soname 'semisync_slave.so';
> set global rpl_semi_sync_slave_enabled = 1;
# 이미 replication이 동작중이라면 slave의 io_thread를 재시작해야 한다.
> stop slave io_thread;
> start slave io_thread;
<<<셋팅 확인>>>
# Master
show variables like 'rpl_semi_sync%';
show status like 'rpl_semi_sync%';
# slave
show variables like 'rpl_semi_sync%';
show status like 'rpl_semi_sync%';
--replication이 동작중인데 io_thread를 시작안하면 show status 의 값이 flase로 나온다.
재시작하면 true로 바뀜