SlideShare a Scribd company logo
1 of 12
Download to read offline
BINLOG server
적용사례
작성 : 기술본부 김피터
1
2
구축 배경
• DB 보안 상 외부에서 직접 DB로의 접속은 금지되어, 기존 Slave 복제 방식은 사용할 수 없음
• 4:33 DB에서 단 방향으로 x.com 로 전달만 가능
4:33 x.com
Binary log server ??
binary
Log
Binary log server sync ??
BACKUPLOG SERVER
binary
Log
svc1-backup
relayLog
Storage
Recovery by
replication
IO
thread
SQL
thread
binary
Log
/usr1/sandboxes/svc1/binlog/
/usr1/sandboxes/svc2/binlog/
/usr1/sandboxes/svc3/binlog/
3306
3307
3308
Binary log server sync 방식
Binary log server sync 방식 – CASE1
LIVE BACKUPLOG SERVER
binLog
Relay
Log
replication
data data
relayLog
Storage
Recovery by
replication
IO
thread
SQL
thread
1
2
In Order
Binary log server sync 방식 – CASE2
LIVE BACKUPLOG SERVER
binLog binLog
Rsync or
other file
sync method
data data
relayLog
Storage
Recovery by
replication
IO
thread
SQL
thread
In Parallel
x.com data sync 적용 사례
x.com data sync 적용 사례
4:33 x.comDMZ
binLog binLog
replication
BinLog 파일을 1분 주기
로 DMZ로 sync
data data
relayLog
x.com data sync 적용 사례
4:33 x.comDMZ
binLog
binLog
1. 마지막 sync 될 때 기록된 binlog 파일명
( rsync.history at 4:33 )과 DMZ 현재 binlog 파일명
이 동일한지 확인
2. 1. 에서 확인 된 DMZ binlog 파일 사이즈가
120( 초기 생성시 크기 )인지 확인
3. 1. 2. 의 확인이 실패하면 관리자에게 ALERT sync
프로세스 중지
4. SHUTDOWN DMZ mysqld
4-1. DMZ mysqld stop으로 인한
replication 중지 ( 5초 간격으로 retry )
data data
relayLog
5. Binary log rotate ( at 4:33 ) FLUSH LOGS
6. mysql-bin.index.temp 생성 ( sync 되어야 할
binlog list & DMZ binlog path )
7. Rsync binlog ( current binlog 제외 )
8. mv mysql-bin.index.temp mysql-bin.index
( at DMZ )
9. Start mysqld ( at DMZ ) 9-1. Replication 자동 재개
10. Current binlog를 rsync.history 에 기록
x.com data sync 적용 사례
• 장점
 하나의 slave를 추가 운영하는 것과 거의 동일
• 단점
 4:33 에서 DMZ로 BINLOG sync 시 x.com 에서 DMZ replication pause 발생
 4:33 MASTER 장애시 x.com slave 재구성이 필요한 경우가 있을 수 있음.
 Binary log 서버 장비 추가 필요
• 운영이슈
 점검 시간 단축을 위한 MMS role 변경 시에 x.com 복제 중지 시간을 최소화
 하려면 신규 PRIMARY MASTER 기준으로 binlog sync가 변경되어야 함.
 기존 PRIMARY 점검 시간 동안 x.com 복제 중지가 허용할 만하면 변경 없이 그대로 유지하면 됨.
12

More Related Content

What's hot

MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKYoungHeon (Roy) Kim
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroDatabricks
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!Vitor Oliveira
 
MongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTigerMongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTigerWiredTiger
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Ludovico Caldara
 
MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼NeoClova
 
High performance and high availability proxies for MySQL
High performance and high availability proxies for MySQLHigh performance and high availability proxies for MySQL
High performance and high availability proxies for MySQLMydbops
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkFlink Forward
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestI Goo Lee
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)Altinity Ltd
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestratorYoungHeon (Roy) Kim
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScaleMariaDB plc
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency CephShapeBlue
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기NeoClova
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialColin Charles
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouseAltinity Ltd
 
[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google CloudPgDay.Seoul
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 

What's hot (20)

MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!
 
MongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTigerMongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2015 - A Technical Introduction to WiredTiger
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?
 
MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼MariaDB MaxScale monitor 매뉴얼
MariaDB MaxScale monitor 매뉴얼
 
High performance and high availability proxies for MySQL
High performance and high availability proxies for MySQLHigh performance and high availability proxies for MySQL
High performance and high availability proxies for MySQL
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 
MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency Ceph
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouse
 
[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 

Similar to Binlog Servers 구축사례

AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)Amazon Web Services Korea
 
MySQL Deep dive with FusionIO
MySQL Deep dive with FusionIOMySQL Deep dive with FusionIO
MySQL Deep dive with FusionIOI Goo Lee
 
Mongo db 복제(Replication)
Mongo db 복제(Replication)Mongo db 복제(Replication)
Mongo db 복제(Replication)Hyosung Jeon
 
Clonezilla se
Clonezilla seClonezilla se
Clonezilla se석 허
 
Kubernetes in action
Kubernetes in actionKubernetes in action
Kubernetes in actionBingu Shim
 
The MongoDB Strikes Back / MongoDB 의 역습
The MongoDB Strikes Back / MongoDB 의 역습The MongoDB Strikes Back / MongoDB 의 역습
The MongoDB Strikes Back / MongoDB 의 역습Hyun-woo Park
 
Kubernetes on Premise Practical Guide
Kubernetes on Premise Practical GuideKubernetes on Premise Practical Guide
Kubernetes on Premise Practical GuideChan Shik Lim
 
Chapter5 embedded storage
Chapter5 embedded storage Chapter5 embedded storage
Chapter5 embedded storage Hyun Wong Choi
 
Chapter5 embedded storage
Chapter5 embedded storage Chapter5 embedded storage
Chapter5 embedded storage Hyun Wong Choi
 
(130316) #fitalk trends in d forensics (feb, 2013)
(130316) #fitalk   trends in d forensics (feb, 2013)(130316) #fitalk   trends in d forensics (feb, 2013)
(130316) #fitalk trends in d forensics (feb, 2013)INSIGHT FORENSIC
 
Hadoop distributed file system rev3
Hadoop distributed file system rev3Hadoop distributed file system rev3
Hadoop distributed file system rev3Sung-jae Park
 
Deploying Hyperledger Fabric on Kubernetes.pptx
Deploying Hyperledger Fabric on Kubernetes.pptxDeploying Hyperledger Fabric on Kubernetes.pptx
Deploying Hyperledger Fabric on Kubernetes.pptxwonyong hwang
 
Pgday bdr gt1000
Pgday bdr gt1000Pgday bdr gt1000
Pgday bdr gt1000정대 천
 
Pgday bdr 천정대
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대PgDay.Seoul
 
Before OTD EDU Assignments
Before OTD EDU AssignmentsBefore OTD EDU Assignments
Before OTD EDU AssignmentsBeom Lee
 
[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016
[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016
[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016Sang Don Kim
 
[찾아가는세미나] 클라우드 데이터 가상화솔루션
[찾아가는세미나] 클라우드 데이터 가상화솔루션[찾아가는세미나] 클라우드 데이터 가상화솔루션
[찾아가는세미나] 클라우드 데이터 가상화솔루션해은 최
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축Ji-Woong Choi
 
XECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 Docker
XECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 DockerXECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 Docker
XECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 DockerXpressEngine
 

Similar to Binlog Servers 구축사례 (20)

AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
 
MySQL Deep dive with FusionIO
MySQL Deep dive with FusionIOMySQL Deep dive with FusionIO
MySQL Deep dive with FusionIO
 
OracleHistory2
OracleHistory2OracleHistory2
OracleHistory2
 
Mongo db 복제(Replication)
Mongo db 복제(Replication)Mongo db 복제(Replication)
Mongo db 복제(Replication)
 
Clonezilla se
Clonezilla seClonezilla se
Clonezilla se
 
Kubernetes in action
Kubernetes in actionKubernetes in action
Kubernetes in action
 
The MongoDB Strikes Back / MongoDB 의 역습
The MongoDB Strikes Back / MongoDB 의 역습The MongoDB Strikes Back / MongoDB 의 역습
The MongoDB Strikes Back / MongoDB 의 역습
 
Kubernetes on Premise Practical Guide
Kubernetes on Premise Practical GuideKubernetes on Premise Practical Guide
Kubernetes on Premise Practical Guide
 
Chapter5 embedded storage
Chapter5 embedded storage Chapter5 embedded storage
Chapter5 embedded storage
 
Chapter5 embedded storage
Chapter5 embedded storage Chapter5 embedded storage
Chapter5 embedded storage
 
(130316) #fitalk trends in d forensics (feb, 2013)
(130316) #fitalk   trends in d forensics (feb, 2013)(130316) #fitalk   trends in d forensics (feb, 2013)
(130316) #fitalk trends in d forensics (feb, 2013)
 
Hadoop distributed file system rev3
Hadoop distributed file system rev3Hadoop distributed file system rev3
Hadoop distributed file system rev3
 
Deploying Hyperledger Fabric on Kubernetes.pptx
Deploying Hyperledger Fabric on Kubernetes.pptxDeploying Hyperledger Fabric on Kubernetes.pptx
Deploying Hyperledger Fabric on Kubernetes.pptx
 
Pgday bdr gt1000
Pgday bdr gt1000Pgday bdr gt1000
Pgday bdr gt1000
 
Pgday bdr 천정대
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대
 
Before OTD EDU Assignments
Before OTD EDU AssignmentsBefore OTD EDU Assignments
Before OTD EDU Assignments
 
[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016
[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016
[Td 2015] 국내에서 처음으로 선보이는 microsoft 차세대 서버 운영 체제 windows server 2016
 
[찾아가는세미나] 클라우드 데이터 가상화솔루션
[찾아가는세미나] 클라우드 데이터 가상화솔루션[찾아가는세미나] 클라우드 데이터 가상화솔루션
[찾아가는세미나] 클라우드 데이터 가상화솔루션
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
 
XECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 Docker
XECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 DockerXECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 Docker
XECon2015 :: [1-5] 김훈민 - 서버 운영자가 꼭 알아야 할 Docker
 

More from I Goo Lee

MySQL_Fabric_운영시유의사항
MySQL_Fabric_운영시유의사항MySQL_Fabric_운영시유의사항
MySQL_Fabric_운영시유의사항I Goo Lee
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQLI Goo Lee
 
From MSSQL to MariaDB
From MSSQL to MariaDBFrom MSSQL to MariaDB
From MSSQL to MariaDBI Goo Lee
 
AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기I Goo Lee
 
Backup automation in KAKAO
Backup automation in KAKAO Backup automation in KAKAO
Backup automation in KAKAO I Goo Lee
 
텔레그램을 이용한 양방향 모니터링 시스템 구축
텔레그램을 이용한 양방향 모니터링 시스템 구축텔레그램을 이용한 양방향 모니터링 시스템 구축
텔레그램을 이용한 양방향 모니터링 시스템 구축I Goo Lee
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례I Goo Lee
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용I Goo Lee
 
MySQL 5.7 NF – Optimizer Improvement
 MySQL 5.7 NF – Optimizer Improvement MySQL 5.7 NF – Optimizer Improvement
MySQL 5.7 NF – Optimizer ImprovementI Goo Lee
 
MySQL 5.7 NF – JSON Datatype 활용
MySQL 5.7 NF – JSON Datatype 활용MySQL 5.7 NF – JSON Datatype 활용
MySQL 5.7 NF – JSON Datatype 활용I Goo Lee
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)I Goo Lee
 
MS 빅데이터 서비스 및 게임사 PoC 사례 소개
MS 빅데이터 서비스 및 게임사 PoC 사례 소개MS 빅데이터 서비스 및 게임사 PoC 사례 소개
MS 빅데이터 서비스 및 게임사 PoC 사례 소개I Goo Lee
 
AWS 환경에서 MySQL Infra 설계하기-2본론
AWS 환경에서 MySQL Infra 설계하기-2본론AWS 환경에서 MySQL Infra 설계하기-2본론
AWS 환경에서 MySQL Infra 설계하기-2본론I Goo Lee
 
AWS 환경에서 MySQL Infra 설계하기-1도입부분
AWS 환경에서 MySQL Infra 설계하기-1도입부분AWS 환경에서 MySQL Infra 설계하기-1도입부분
AWS 환경에서 MySQL Infra 설계하기-1도입부분I Goo Lee
 
AWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTAWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTI Goo Lee
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKI Goo Lee
 
MySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKMySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKI Goo Lee
 
PostgreSQL 이야기
PostgreSQL 이야기PostgreSQL 이야기
PostgreSQL 이야기I Goo Lee
 
Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)I Goo Lee
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQLI Goo Lee
 

More from I Goo Lee (20)

MySQL_Fabric_운영시유의사항
MySQL_Fabric_운영시유의사항MySQL_Fabric_운영시유의사항
MySQL_Fabric_운영시유의사항
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQL
 
From MSSQL to MariaDB
From MSSQL to MariaDBFrom MSSQL to MariaDB
From MSSQL to MariaDB
 
AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기
 
Backup automation in KAKAO
Backup automation in KAKAO Backup automation in KAKAO
Backup automation in KAKAO
 
텔레그램을 이용한 양방향 모니터링 시스템 구축
텔레그램을 이용한 양방향 모니터링 시스템 구축텔레그램을 이용한 양방향 모니터링 시스템 구축
텔레그램을 이용한 양방향 모니터링 시스템 구축
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 
MySQL 5.7 NF – Optimizer Improvement
 MySQL 5.7 NF – Optimizer Improvement MySQL 5.7 NF – Optimizer Improvement
MySQL 5.7 NF – Optimizer Improvement
 
MySQL 5.7 NF – JSON Datatype 활용
MySQL 5.7 NF – JSON Datatype 활용MySQL 5.7 NF – JSON Datatype 활용
MySQL 5.7 NF – JSON Datatype 활용
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
 
MS 빅데이터 서비스 및 게임사 PoC 사례 소개
MS 빅데이터 서비스 및 게임사 PoC 사례 소개MS 빅데이터 서비스 및 게임사 PoC 사례 소개
MS 빅데이터 서비스 및 게임사 PoC 사례 소개
 
AWS 환경에서 MySQL Infra 설계하기-2본론
AWS 환경에서 MySQL Infra 설계하기-2본론AWS 환경에서 MySQL Infra 설계하기-2본론
AWS 환경에서 MySQL Infra 설계하기-2본론
 
AWS 환경에서 MySQL Infra 설계하기-1도입부분
AWS 환경에서 MySQL Infra 설계하기-1도입부분AWS 환경에서 MySQL Infra 설계하기-1도입부분
AWS 환경에서 MySQL Infra 설계하기-1도입부분
 
AWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTAWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMT
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 
MySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKMySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELK
 
PostgreSQL 이야기
PostgreSQL 이야기PostgreSQL 이야기
PostgreSQL 이야기
 
Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 

Binlog Servers 구축사례

  • 1. BINLOG server 적용사례 작성 : 기술본부 김피터 1
  • 2. 2 구축 배경 • DB 보안 상 외부에서 직접 DB로의 접속은 금지되어, 기존 Slave 복제 방식은 사용할 수 없음 • 4:33 DB에서 단 방향으로 x.com 로 전달만 가능 4:33 x.com
  • 4. binary Log Binary log server sync ?? BACKUPLOG SERVER binary Log svc1-backup relayLog Storage Recovery by replication IO thread SQL thread binary Log /usr1/sandboxes/svc1/binlog/ /usr1/sandboxes/svc2/binlog/ /usr1/sandboxes/svc3/binlog/ 3306 3307 3308
  • 5. Binary log server sync 방식
  • 6. Binary log server sync 방식 – CASE1 LIVE BACKUPLOG SERVER binLog Relay Log replication data data relayLog Storage Recovery by replication IO thread SQL thread 1 2 In Order
  • 7. Binary log server sync 방식 – CASE2 LIVE BACKUPLOG SERVER binLog binLog Rsync or other file sync method data data relayLog Storage Recovery by replication IO thread SQL thread In Parallel
  • 8. x.com data sync 적용 사례
  • 9. x.com data sync 적용 사례 4:33 x.comDMZ binLog binLog replication BinLog 파일을 1분 주기 로 DMZ로 sync data data relayLog
  • 10. x.com data sync 적용 사례 4:33 x.comDMZ binLog binLog 1. 마지막 sync 될 때 기록된 binlog 파일명 ( rsync.history at 4:33 )과 DMZ 현재 binlog 파일명 이 동일한지 확인 2. 1. 에서 확인 된 DMZ binlog 파일 사이즈가 120( 초기 생성시 크기 )인지 확인 3. 1. 2. 의 확인이 실패하면 관리자에게 ALERT sync 프로세스 중지 4. SHUTDOWN DMZ mysqld 4-1. DMZ mysqld stop으로 인한 replication 중지 ( 5초 간격으로 retry ) data data relayLog 5. Binary log rotate ( at 4:33 ) FLUSH LOGS 6. mysql-bin.index.temp 생성 ( sync 되어야 할 binlog list & DMZ binlog path ) 7. Rsync binlog ( current binlog 제외 ) 8. mv mysql-bin.index.temp mysql-bin.index ( at DMZ ) 9. Start mysqld ( at DMZ ) 9-1. Replication 자동 재개 10. Current binlog를 rsync.history 에 기록
  • 11. x.com data sync 적용 사례 • 장점  하나의 slave를 추가 운영하는 것과 거의 동일 • 단점  4:33 에서 DMZ로 BINLOG sync 시 x.com 에서 DMZ replication pause 발생  4:33 MASTER 장애시 x.com slave 재구성이 필요한 경우가 있을 수 있음.  Binary log 서버 장비 추가 필요 • 운영이슈  점검 시간 단축을 위한 MMS role 변경 시에 x.com 복제 중지 시간을 최소화  하려면 신규 PRIMARY MASTER 기준으로 binlog sync가 변경되어야 함.  기존 PRIMARY 점검 시간 동안 x.com 복제 중지가 허용할 만하면 변경 없이 그대로 유지하면 됨.
  • 12. 12