mysqlha 3

MySQL Group Replication

Single/Multi Primary Mode 그룹 복제는 Client에서 Failover를 처리하지 않으므로 MySQL Router 8.0, ProxySQL, Connector 등으로 redirection 조치 미들웨어가 추가 되어야 함 group_replication_single_primary_mode 값을 모두 같은 값으로 설정해야 하며 GR 실행 중에 변경할 수 없음 group_replication_bootstrap_group=ON 으로 전체 reboot 필요 (안전하게 트랜잭션이 처리되며 실행할 수 있도록 함) MySQL 8.0.16 이후부터 group_replication_switch_to_single_primary_mode(), group_replication_switch_to_multi_p..

MySQL HA (Orchestrator, ProxySQL, Consul)

동작 방법 MySQL (is source that replicating) > Orchestrator (will be actively polling mysql for information & pulling it into its own space) > as updates are done,it will push infromation into Consul (Key-value store) > other processes take data from the Consul and update to ProxySQL (proxy application) almost immediate SPOF 요소 제거를 위해 Orchestrator 사용 Orchestrator: MySQL 복제 운영 및 복구 실행 automatically r..

ProxySQL과 Orchestrator의 simple STONITH

STONITH (Shoot The Other Node In The Head) 재설정하거나 전원을 차단하여 문제가 생긴 노드를 클러스터에서 제외 시키는 테크닉 multi-DC 구조에서 ProxySQL이 routing 과 proxying 을 해주는데 DC1 번의 primary MySQL 노드에서 잠시 이상이 생겼을 때 Orachestrator health check 에서 이상이 생김을 감지하고 DC2 의 다른 노드를 primary로 승격시킬 수 있다. 하지만 잠깐 동안 발생했던 문제의 DC1 의 노드가 정상으로 돌아올 때 문제가 발생할 수 있다. ProxySQL이 이 노드를 다시 read-write 가 가능하다고 지정하려는 경쟁적인 상황이 발생할 수 있고, Orchestrator 가 다시 node를 먼저 찾..