How to Manage Scale-Out Environments with MariaDB MaxScale
MaxScale is a database proxy that provides load balancing, connection pooling, and replication capabilities for MariaDB and MySQL databases. It can be used to scale databases horizontally across multiple servers for increased performance and availability. The document provides an overview of MaxScale concepts and capabilities such as routing, filtering, security features, and how it can be used for operational tasks like query caching, logging, and data streaming. It also includes instructions on setting up MaxScale with a basic example of configuring read/write splitting between a master and slave database servers.
MariaDB MaxScale is a database proxy that provides scalability, high availability, and data streaming capabilities for MariaDB and MySQL databases. It acts as a load balancer and router to distribute queries across database servers. MaxScale supports services like read/write splitting, query caching, and security features like selective data masking. It can monitor replication lag and route queries accordingly. MaxScale uses a plugin architecture and its core remains stateless to provide flexibility and high performance.
MariaDB 10.5 binary install (바이너리 설치)
- 네오클로바 DB지원사업부
1. About MariaDB
1.1 MariaDB 개요
1.2 MariaDB as a R-DBMS
1.3 Open Source Database System
2. 설치
2.1 설치 기본 정보
2.2 설치 준비
2.3 MariaDB 설치
2.4 MariaDB 시작 / 접속 / 종료
2.5 추가 설정
MySQL 소개
간략한 소개
version history
MySQL 사용처
제품 군 변화
시장 변화
MySQL 구성
MySQL 클라이언트 / 서버 개념
클라이언트 프로그램
MySQL 설치
MySQL 버전
MySQL 설치
MySQL 환경 설정
환경설정, 변수 설정
MySQL 스토리지 엔진 소개
MySQL tuning 소개 및 방법
데이터 백업/복구 방법
백업
복구
MySQL Upgrade
The document discusses the Performance Schema in MySQL. It provides an overview of what the Performance Schema is and how it can be used to monitor events within a MySQL server. It also describes how to configure the Performance Schema by setting up actors, objects, instruments, consumers and threads to control what is monitored. Finally, it explains how to initialize the Performance Schema by truncating existing summary tables before collecting new performance data.
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
MySQL Clustering over InnoDB engines has grown a lot over the last decade. Galera began working with InnoDB early and then Group Replication came to the environment later, where the features are now rich and robust. This presentation offers a technical comparison of both of them.
The document discusses running MariaDB across multiple data centers. It begins by outlining the need for multi-datacenter database architectures to provide high availability, disaster recovery, and continuous operation. It then describes topology choices for different use cases, including traditional disaster recovery, geo-synchronous distributed architectures, and how technologies like MariaDB Master/Slave and Galera Cluster work. The rest of the document discusses answering key questions when designing a multi-datacenter topology, trade-offs to consider, architecture technologies, and pros and cons of different approaches.
MySQL Administrator
Basic course
- MySQL 개요
- MySQL 설치 / 설정
- MySQL 아키텍처 - MySQL 스토리지 엔진
- MySQL 관리
- MySQL 백업 / 복구
- MySQL 모니터링
Advanced course
- MySQL Optimization
- MariaDB / Percona
- MySQL HA (High Availability)
- MySQL troubleshooting
네오클로바
http://neoclova.co.kr/
How to Manage Scale-Out Environments with MariaDB MaxScaleMariaDB plc
MaxScale is a database proxy that provides load balancing, connection pooling, and replication capabilities for MariaDB and MySQL databases. It can be used to scale databases horizontally across multiple servers for increased performance and availability. The document provides an overview of MaxScale concepts and capabilities such as routing, filtering, security features, and how it can be used for operational tasks like query caching, logging, and data streaming. It also includes instructions on setting up MaxScale with a basic example of configuring read/write splitting between a master and slave database servers.
MariaDB MaxScale is a database proxy that provides scalability, high availability, and data streaming capabilities for MariaDB and MySQL databases. It acts as a load balancer and router to distribute queries across database servers. MaxScale supports services like read/write splitting, query caching, and security features like selective data masking. It can monitor replication lag and route queries accordingly. MaxScale uses a plugin architecture and its core remains stateless to provide flexibility and high performance.
MariaDB 10.5 binary install (바이너리 설치)
- 네오클로바 DB지원사업부
1. About MariaDB
1.1 MariaDB 개요
1.2 MariaDB as a R-DBMS
1.3 Open Source Database System
2. 설치
2.1 설치 기본 정보
2.2 설치 준비
2.3 MariaDB 설치
2.4 MariaDB 시작 / 접속 / 종료
2.5 추가 설정
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법Ji-Woong Choi
MySQL 소개
간략한 소개
version history
MySQL 사용처
제품 군 변화
시장 변화
MySQL 구성
MySQL 클라이언트 / 서버 개념
클라이언트 프로그램
MySQL 설치
MySQL 버전
MySQL 설치
MySQL 환경 설정
환경설정, 변수 설정
MySQL 스토리지 엔진 소개
MySQL tuning 소개 및 방법
데이터 백업/복구 방법
백업
복구
MySQL Upgrade
The document discusses the Performance Schema in MySQL. It provides an overview of what the Performance Schema is and how it can be used to monitor events within a MySQL server. It also describes how to configure the Performance Schema by setting up actors, objects, instruments, consumers and threads to control what is monitored. Finally, it explains how to initialize the Performance Schema by truncating existing summary tables before collecting new performance data.
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Mydbops
MySQL Clustering over InnoDB engines has grown a lot over the last decade. Galera began working with InnoDB early and then Group Replication came to the environment later, where the features are now rich and robust. This presentation offers a technical comparison of both of them.
Running MariaDB in multiple data centersMariaDB plc
The document discusses running MariaDB across multiple data centers. It begins by outlining the need for multi-datacenter database architectures to provide high availability, disaster recovery, and continuous operation. It then describes topology choices for different use cases, including traditional disaster recovery, geo-synchronous distributed architectures, and how technologies like MariaDB Master/Slave and Galera Cluster work. The rest of the document discusses answering key questions when designing a multi-datacenter topology, trade-offs to consider, architecture technologies, and pros and cons of different approaches.
MaxScale uses an asynchronous and multi-threaded architecture to route client queries to backend database servers. Each thread creates its own epoll instance to monitor file descriptors for I/O events, avoiding locking between threads. Listening sockets are added to a global epoll file descriptor that notifies threads when clients connect, allowing connections to be distributed evenly across threads. This architecture improves performance over the previous single epoll instance approach.
MySQL Administrator
Basic course
- MySQL 개요
- MySQL 설치 / 설정
- MySQL 아키텍처 - MySQL 스토리지 엔진
- MySQL 관리
- MySQL 백업 / 복구
- MySQL 모니터링
Advanced course
- MySQL Optimization
- MariaDB / Percona
- MySQL HA (High Availability)
- MySQL troubleshooting
네오클로바
http://neoclova.co.kr/
This document summarizes information about scaling out MariaDB server and cluster with MaxScale. It discusses the ReadWriteSplit and ConnectionRoute routers for scaling out a MariaDB server replication topology. It also discusses using the Galera Monitor and ReadWriteSplit modules to scale out a MariaDB Cluster deployment with MaxScale. Configurations are provided for using these routers and monitors with MaxScale.
This document discusses different approaches to achieving high availability with MariaDB databases, including replication, Galera clusters, and MaxScale load balancing. It describes asynchronous and semi-synchronous replication topologies that provide redundancy and enable failover. Synchronous replication with Galera clusters is discussed as another option that ensures all nodes remain in sync with no data loss. MaxScale is presented as a tool that can monitor MariaDB topologies and perform load balancing and failover across nodes.
Optimizing MariaDB for maximum performanceMariaDB plc
When it comes to optimizing the performance of a database, DBAs have to look at everything from the OS to the network. In this session, MariaDB Enterprise Architect Manjot Singh shares best practices for getting the most out of MariaDB. He highlights recommended OS settings, important configuration and tuning parameters, options for improving replication and clustering performance and features such as query result caching.
9. 8
MariaDB 이중화 구성방식
* Galera Cluster - L4
#1 #3
WAS(n)
WAS1
장애
Auto Failover
- Role : Connection Router & Failover(HA)
+ #1 Write Connection, 나머지는 Read Connection
+ Read와 Write Connection Port가 다름
- #1 장애 시 자동 Failover
+ L4가 #2로 Write Connection 자동전환
- #1 Failback 절차
+ #1의 L4상의 Write Connection 가중치 조정(하향)
+ #1 기동하면 자동으로 데이터동기화(SST/IST)
+ #1 동기화 완료 후 L4상의 가중치 조정(상향)
+ DBA가 아닌 N/W 담당자의 조치 필요
+ L4 환경 구성의 주의
Manual Rejoin
Write
L4(another port)
#2
Read
Read
#1(Dead) #3
WAS(n)
WAS1
Write
L4(another port)
#2
Read
Read
10. 9
MariaDB 이중화 구성방식
WAS(n)
WAS1
MaxScale
Auto Failover
- Role : Connection Router & Failover(HA)
+ Read와 Write Connection 포트 동일
- #1 장애 시 자동 Failover
+ #2로 Write Connection 자동전환
- #1 Failback 절차
+ #1 기동하면 자동으로 데이터동기화(SST/IST)
+ #1 동기화 완료 후 자동으로 Read Connection수행
+ DBA가 MaxAdmin으로 Online Switchover 수행가능
- MariaDB 전용 HA솔루션
Auto Rejoin
Write
* Galera Cluster - MaxScale
#1 #3
장애
#2
Read
Read
WAS(n)
WAS1
MaxScale
Write
#1(Dead) #3
#2
Read
Read
11. 10
MariaDB 이중화 구성
* HA 솔루션 별 비교
구분 MHA MaxScale L4
Load-Balancing 미지원 지원 지원
Auto-Failover 지원 지원 지원
Auto Replication
(역복제)
미지원 지원 미지원
Auto-Rejoin 미지원 지원 지원
VIP 필요 불필요 필요
GTID 선택 필수 선택
이중화
불가능 가능 가능
* MaxScale의 장점
- 문의하신 Connection을 Write Connection과 Read-Only Conneciton으로 자동분기처리해서
Master노드로 Write Connection을, Read-Only Connection은 Slaves 노드들로 분산처리 합니다.
- 이와 유사한 기능하는 솔루션으로 ProxySQL이 있으나 ProxySQL은 Master노드에 대한 장애시 HA기능을 지원하지 않습니다.
따라서 ProxySQL을 사용하는경우는 MHA등 HA전용솔루션과 함께 사용해야 합니다.
- MaxScale은 Backend DB가 2대인경우는 무상으로 사용가능하나, 3대 이상인경우는 Subscription이 필요합니다.(BSL)
- 또한 MaxScale은 다운된 Master노드를 재기동만 해주더라도 자동으로 복제를 연결하고
완료된 경우 서비스노드로 자동 추가합니다.
* MaxScale의 주요기능
- Auto-Failover
- Transaction Reply
- Read-Write Connection Splitting
- Replication Server(Binlog Server)
- Data Masking
- Query Blocking
- Result limiting
- Change-Data-Capture
- Kafka Connection
MariaDB들의 복제구성에 상관없이 HA솔루션으로
MaxScale을 추천드립니다.
12. 11
MariaDB 이중화 구성 – 1안
* Master / Slave - MaxScale ( Active – Active)
#1(Master) #2(Slave)
WAS(n)
WAS1
MaxScale
#3(Slave)
Read
MaxScale
L4
Write Read
- L4
- VIP할당
- 특정 포트에 대하여 2대의
Maxscale로 분산처리
- 특정 Maxscale장애 시 한쪽 노드로
Routing수행
- MaxScale
- R/W Connection에 대한
지능적인 자동 분산처리
- Master장애시 Slave를 신규 Master
로 승격
- 기타 Slaves를 신규 Master로 연결
- Dead Master가 Online시 Slave로
자동 Join 수행
- Replication Lag에 대한 유연한
Transaction 제어(causal read)
- Master
- Read/Write Transaction 수행
- Slave
- Read Transaction 수행
- Master로부터의 Replication 수행
추천
13. 12
MariaDB 이중화 구성 – 2안
* Master / Slave - MaxScale ( Active – Standby )
#1(Master) #2(Slave)
WAS(n)
WAS1
MaxScale
#3(Slave)
Read
MaxScale
Write Read
- Keepalived
- VIP제어
- VIP할당노드로 Connection 인입
- 노드장애 시 Standby Maxsclae로
VIP 전환
- MaxScale
- R/W Connection에 대한
지능적인 자동 분산처리
- Master장애시 Slave를 신규 Master
로 승격
- 기타 Slaves를 신규 Master로 연결
- Dead Master가 Online시 Slave로
자동 Join 수행
- Replication Lag에 대한 유연한
Transaction 제어(causal read)
- Master
- Read/Write Transaction 수행
- Slave
- Read Transaction 수행
- Master로부터의 Replication 수행
VIP
Keepalived
14. 13
MariaDB/MaxScale 버전 및 Subscription (2021-12-30기준)
* MariaDB Version 선택
구분(GPL) GA-Start EOL 최신
10.2 2017-04-23 2022-04-23 10.2.41
10.3 2018-04-25 2023-04-25 10.3.32
10.4 2019-06-18 2024-06-18 10.4.22
10.5 2020-06-24 2025-06-24 10.5.13
10.6 2021-07-06 2026-07-06 10.6.5
10.7 - - 10.7.1
* MaxScale Version 선택
추천
구분(BSL) GA-Start EOL 최신
2.2 2018-02-01
Minor버전별
차이.
대략 4년
2.2.21
2.3 2018-10-09 2.3.20
2.4 2019-06-29 2.4.18
2.5 2020-10-19 2.5.14
6.1 2021-07-15 6.1.4
6.2 2021-11-26 6.2.0
추천
- GA-Start이후 1년 ~ 1.5년 이후버전
- Minor 버전 x.20 이상 선택
Minor버전이 낮으면 잦은 버그를 인한 장애가능성 있음
- Subscription 구매 시
Enterprise Server에 추가된 HA관련 파라미터 추가지원
shutdown_wait_for_slaves
- Bug에 대한 신속한 Hot-Fix 및 SR 지원을 위해서는
Subscription 필요
- GA-Start이후 1년 ~ 1.5년 이후버전
- 서비스 운영성을 높이기 위해서는
Cooperative Monitoring(2.5이상) 필요
- MaxScale설정에 Backend Server 수가
2대 이하는 무상 이용가능
3대 이상은 Subscription 필요
- MaxScale만의 Subscription은 제공되지 않으며,
MariaDB Enterprise Subscription 구매 시
MaxScale이 포함되어 있음.