SlideShare a Scribd company logo
Best Practice for Designing and
Implementing MySQL Geographic
Distributed, High Availability Solutions
Marco Tusa
Percona
2
• Open source enthusiast
• MySQL tech lead; principal architect
• Working in DB/development
world over 33 years (yes, I am that old)
• Open source developer and community
contributor
About Me
3
Why Are We Talking About Geographic Distribution?
The need to have geographic distribution for…
3
Why Are We Talking About Geographic Distribution?
The need to have geographic distribution for…
Disaster
Recovery
3
Why Are We Talking About Geographic Distribution?
The need to have geographic distribution for…
Disaster
Recovery
Data close to
consumer/user
3
Why Are We Talking About Geographic Distribution?
The need to have geographic distribution for…
Disaster
Recovery
Data close to
consumer/user
Security by
regulations/laws
3
Why Are We Talking About Geographic Distribution?
The need to have geographic distribution for…
Disaster
Recovery
Data close to
consumer/user
Security by
regulations/laws
4
What is Geographic Distribution?
● What is geographic distribution?
○ Near ! High Availability
○ Far ! Disaster Recovery
• Geographic distribution in
High Availability is to cover
service availability in a location
○ 10 Gb Ethernet best case scenario
400 metre distance max
What is HA and What is DR?
• Geographic distribution in
Disaster Recovery is to assure
we can restore service, in a
geographically distributed location
○ Real speed may vary
○ Linear distance ~1000Km
What is HA and What is DR?
7
The Impact of Distance on Geographic Distribution
A Real-Life Example
I worked on many cases where a customer had two data centers (DC).
I will use information from one of the case as example.
The DC were at a distance of approximately 400 km, connected with a “fiber
channel”.
Server 1 and Server 2 were hosted in the same DC, while Server 3 was in the
secondary DC.
Their ping to Server3 was ~3ms. Not bad at all, right?
We decided to perform some serious tests, running multiple sets of tests with
netperf for many days collecting data. We also used the data to perform
additional fine-tuning on the TCP/IP layer AND at the network provider.
A Real-Life Example
Observations
37ms latency is not very high. If that had been the top limit, it would have
worked.
But, it was not.
In the presence of the optimized channel, with fiber and so on, when the tests
were hitting heavy traffic, the congestion was enough to compromise the data
transmitted.
It hit a latency >200ms for Server 3. Note those were spikes, but if you are in
the presence of a tightly coupled database cluster, those events can become
failures in applying the data, and can create a lot of instability.
Facts About Server 3
The connection between the two was with fiber.
Distance Km ~400 (~800), we need to double because of the round trip,
we also receive packages.
Theoretical time at light-speed =2.66ms (2 ways)
Ping = 3.10ms (signal traveling at ~80% of the light speed) as if the
signal had traveled ~930Km (full round trip 800 Km)
TCP/IP best at 48K = 4.27ms (~62% light speed) as if the signal had
traveled ~1,281km
TCP/IP best at 512K =37.25ms (~2.6% light speed) as if the signal had
traveled ~11,175km
Given the above, we have from ~20%-~40% to ~97% loss from the
theoretical transmission rate.
TCP Encapsulation
Max transportable 1500 MTU – IP Header – TCP Header 1500 – ~40 = 1460 bytes
TCP Sliding Window
Some Numbers
• With 8KB we need 6 IP Frames
• With 40KB we need 28 IP Frames
• With 387KB we need 271 IP Frames
• With 1MB we need 718 IP Frames
• With 4MB we need ~2,800 Frames
All this if we use the full TCP capacity
Which Solutions Are Available?
2 Models
Tightly coupled database clusters
• Datacentric approach (single state of
the data, distributed commit)
• Data is consistent in time cross nodes
• Replication requires high performant
link
• Geographic distribution is forbidden
• DR is not supported
Loosely coupled database clusters
• Single node approach (local commit)
• Data state differs by node
• Single node state does not affect the
cluster
• Replication link doesn’t need to be high
performance
• Geographic distribution is allowed
• DR is supported
Replicate Data is the Key - Sync vs Async
1 Data State
3 Different
Data States
Tightly
coupled
Loosely
coupled
17
Which Implementations?: Primary - Secondary
Replication by internal design
Positive things:
• Each node is independent
• Read scale
• Low network impact
Negative things:
• Stale reads
• Low HA
• Consistent only in the Primary
• Each node has its own data state
Loosely coupled
18
Replication by internal design
Positive things:
• Highly available
• Read scale
• Data is in almost in sync all of the time
Negative things:
• Doesn’t scale writes
• More nodes = more internal
overhead
• Network is a very impacting factor
• 1 Writer only (PLEASE!!!!!)
Which Implementations?: PXC
Tightly coupled
19
Which Implementations?: PS – Group Replication
Replication by standard MySQL
Positive things:
• Highly available
• Read scale
• Data is in almost in sync
all the time
• More network tolerant
Negative things:
• Doesn’t scale writes
• 1 Writer only (PLEASE!!!!!)
Tightly coupled
20
Implementations by HA Level and Tight/Loose Relation
20
Implementations by HA Level and Tight/Loose Relation
Architectures: What Should NOT Be Done 1
London West
London East
Frankfurt
Node 1
Node 2
Node 3
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Architectures: What Should NOT Be Done 1
London West
London East
Frankfurt
Node 1
Node 2
Node 3
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Slave
Architectures: What Should NOT Be Done 2
London West
London East
Frankfurt
Node 1
Node 2
Node 3
Secondary
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Slave
Architectures: What Should NOT Be Done 2
London West
London East
Frankfurt
Node 1
Node 2
Node 3
Secondary
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Architectures: What Can Be Done
Slave
London West
London West
(400 mt limit)
Frankfurt
Node 1
Node 2
Node 3
S-Node1
S-Node2
S-Node3
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Architectures: What Can Be Done
Slave
London West
London West
(400 mt limit)
Frankfurt
Node 1
Node 2
Node 3
S-Node1
S-Node2
S-Node3
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Architectures: What You Should Do
Slave
London Frankfurt
Node 1
Node 2
Node 3
S-Node1
S-Node2
S-Node3
Sync High perf link
Sync Internet link
Async Internet link
Sync High perf internet link
Conclusion - a Healthy Solution
Must have a business continuity plan and cover at least:
● HA
● DR (RTO)
● Backup/restore (RPO)
● Load distribution
● Correct monitoring/alerting
Conclusion - a Healthy Solution*
*I am showing PXC/Galera replication by convenience, but it could also be Percona Server with Group
Replication
Conclusion - a Healthy Solution
Must have a business continuity plan and cover at least:
● HA → (PXC OR PS-GR)
● DR → (PXC OR PS-GR) with Asynchronous replication and RMP
(replication manager for PXC/PS-GR)
● Backup/restore → Backup/restore policy
● Load distribution → ProxySQL with Query rules
● Correct monitoring/alerting → Percona Monitoring and
Management (PMM)
Useful References
● https://www.percona.com/blog/2018/11/15/mysql-high-availability-on-premises-a-geographically-distributed-scenario/
● https://dev.mysql.com/doc/mysql-ha-scalability/en/ha-overview.html
● https://www.percona.com/blog/2014/11/17/typical-misconceptions-on-galera-for-mysql/
● http://galeracluster.com/documentation-webpages/limitations.html
● http://tusacentral.net/joomla/index.php/mysql-blogs/170-geographic-replication-and-quorum-calculation-in-mysqlgalera.html
● http://tusacentral.net/joomla/index.php/mysql-blogs/167-geographic-replication-with-mysql-and-galera.html
● http://tusacentral.net/joomla/index.php/mysql-blogs/164-effective-way-to-check-the-network-connection-when-in-need-of-a-
geographic-distribution-replication-.html
● http://tusacentral.net/joomla/index.php/mysql-blogs/183-proxysql-percona-cluster-galera-integration.html
● https://github.com/sysown/proxysql/wiki
● https://www.percona.com/blog/2018/11/15/how-not-to-do-mysql-high-availability-geographic-node-distribution-with-galera-
based-replication-misuse/
● https://github.com/y-trudeau/Mysql-tools/tree/master/PXC
Best practice-high availability-solution-geo-distributed-final
Best practice-high availability-solution-geo-distributed-final

More Related Content

What's hot

Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
StreamNative
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introduction
colorant
 
Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips
confluent
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Lucas Jellema
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
Taras Matyashovsky
 
Apache Flink & Graph Processing
Apache Flink & Graph ProcessingApache Flink & Graph Processing
Apache Flink & Graph Processing
Vasia Kalavri
 
Load Balancing
Load BalancingLoad Balancing
Load Balancing
optalink
 
Druid deep dive
Druid deep diveDruid deep dive
Druid deep dive
Kashif Khan
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
Amazon Web Services
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
SANG WON PARK
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQL
Christian Antognini
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
Marco Pracucci
 
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features HighlightsVictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics
 
Understanding InfluxDB Basics: Tags, Fields and Measurements
Understanding InfluxDB Basics: Tags, Fields and MeasurementsUnderstanding InfluxDB Basics: Tags, Fields and Measurements
Understanding InfluxDB Basics: Tags, Fields and Measurements
InfluxData
 
Data Analytics and Processing at Snap - Druid Meetup LA - September 2018
Data Analytics and Processing at Snap - Druid Meetup LA - September 2018Data Analytics and Processing at Snap - Druid Meetup LA - September 2018
Data Analytics and Processing at Snap - Druid Meetup LA - September 2018
Charles Allen
 
Getting started with azure event hubs and stream analytics services
Getting started with azure event hubs and stream analytics servicesGetting started with azure event hubs and stream analytics services
Getting started with azure event hubs and stream analytics services
EastBanc Tachnologies
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
Bellaj Badr
 
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's ScalePinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Seunghyun Lee
 
Implementing Highly Performant Distributed Aggregates
Implementing Highly Performant Distributed AggregatesImplementing Highly Performant Distributed Aggregates
Implementing Highly Performant Distributed Aggregates
ScyllaDB
 
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Amy W. Tang
 

What's hot (20)

Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introduction
 
Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
 
Apache Flink & Graph Processing
Apache Flink & Graph ProcessingApache Flink & Graph Processing
Apache Flink & Graph Processing
 
Load Balancing
Load BalancingLoad Balancing
Load Balancing
 
Druid deep dive
Druid deep diveDruid deep dive
Druid deep dive
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQL
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
 
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features HighlightsVictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
 
Understanding InfluxDB Basics: Tags, Fields and Measurements
Understanding InfluxDB Basics: Tags, Fields and MeasurementsUnderstanding InfluxDB Basics: Tags, Fields and Measurements
Understanding InfluxDB Basics: Tags, Fields and Measurements
 
Data Analytics and Processing at Snap - Druid Meetup LA - September 2018
Data Analytics and Processing at Snap - Druid Meetup LA - September 2018Data Analytics and Processing at Snap - Druid Meetup LA - September 2018
Data Analytics and Processing at Snap - Druid Meetup LA - September 2018
 
Getting started with azure event hubs and stream analytics services
Getting started with azure event hubs and stream analytics servicesGetting started with azure event hubs and stream analytics services
Getting started with azure event hubs and stream analytics services
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
 
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's ScalePinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
 
Implementing Highly Performant Distributed Aggregates
Implementing Highly Performant Distributed AggregatesImplementing Highly Performant Distributed Aggregates
Implementing Highly Performant Distributed Aggregates
 
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
 

Similar to Best practice-high availability-solution-geo-distributed-final

ROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptxROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptx
AayushMishra89
 
Network-aware Data Management for High Throughput Flows Akamai, Cambridge, ...
Network-aware Data Management for High Throughput Flows   Akamai, Cambridge, ...Network-aware Data Management for High Throughput Flows   Akamai, Cambridge, ...
Network-aware Data Management for High Throughput Flows Akamai, Cambridge, ...
balmanme
 
High performance browser networking ch1,2,3
High performance browser networking ch1,2,3High performance browser networking ch1,2,3
High performance browser networking ch1,2,3
Seung-Bum Lee
 
Module 1 Introduction to Computer Networks.pptx
Module 1 Introduction to Computer Networks.pptxModule 1 Introduction to Computer Networks.pptx
Module 1 Introduction to Computer Networks.pptx
AASTHAJAJOO
 
Network
NetworkNetwork
Network
Ynon Perek
 
Network in brief
Network in briefNetwork in brief
Network in brief
Himant Prasansu
 
Unit i packet switching networks
Unit i  packet switching networksUnit i  packet switching networks
Unit i packet switching networks
sangusajjan
 
Network-aware Data Management for Large Scale Distributed Applications, IBM R...
Network-aware Data Management for Large Scale Distributed Applications, IBM R...Network-aware Data Management for Large Scale Distributed Applications, IBM R...
Network-aware Data Management for Large Scale Distributed Applications, IBM R...
balmanme
 
Lecture set 1
Lecture set 1Lecture set 1
Lecture set 1
Gopi Saiteja
 
Networking lecture1
Networking lecture1Networking lecture1
Networking lecture1
Vasanti Dutta
 
LAN Design and implementation of Shanto Mariam University of Creative Technology
LAN Design and implementation of Shanto Mariam University of Creative TechnologyLAN Design and implementation of Shanto Mariam University of Creative Technology
LAN Design and implementation of Shanto Mariam University of Creative Technology
Abdullah Al Mamun
 
Cloud interconnection networks basic .pptx
Cloud interconnection networks basic .pptxCloud interconnection networks basic .pptx
Cloud interconnection networks basic .pptx
RahulBhole12
 
Evolution of network - computer networks
Evolution of network - computer networksEvolution of network - computer networks
Evolution of network - computer networks
SabarishSanjeevi
 
Computer Networks Lecture Notes
Computer Networks Lecture NotesComputer Networks Lecture Notes
Computer Networks Lecture Notes
FellowBuddy.com
 
Simulating the behavior of satellite Internet links to small islands
Simulating the behavior of satellite Internet links to small islandsSimulating the behavior of satellite Internet links to small islands
Simulating the behavior of satellite Internet links to small islands
APNIC
 
1 introduction
1 introduction1 introduction
1 introduction
TageleBerihun
 
Routing Protocols
Routing ProtocolsRouting Protocols
Presentation8
Presentation8Presentation8
Presentation8
Mohd Yusak
 
DITEC - Fundamentals in Networking
DITEC - Fundamentals in NetworkingDITEC - Fundamentals in Networking
DITEC - Fundamentals in Networking
Rasan Samarasinghe
 
Dc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switchingDc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switching
Syaiful Ahdan
 

Similar to Best practice-high availability-solution-geo-distributed-final (20)

ROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptxROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptx
 
Network-aware Data Management for High Throughput Flows Akamai, Cambridge, ...
Network-aware Data Management for High Throughput Flows   Akamai, Cambridge, ...Network-aware Data Management for High Throughput Flows   Akamai, Cambridge, ...
Network-aware Data Management for High Throughput Flows Akamai, Cambridge, ...
 
High performance browser networking ch1,2,3
High performance browser networking ch1,2,3High performance browser networking ch1,2,3
High performance browser networking ch1,2,3
 
Module 1 Introduction to Computer Networks.pptx
Module 1 Introduction to Computer Networks.pptxModule 1 Introduction to Computer Networks.pptx
Module 1 Introduction to Computer Networks.pptx
 
Network
NetworkNetwork
Network
 
Network in brief
Network in briefNetwork in brief
Network in brief
 
Unit i packet switching networks
Unit i  packet switching networksUnit i  packet switching networks
Unit i packet switching networks
 
Network-aware Data Management for Large Scale Distributed Applications, IBM R...
Network-aware Data Management for Large Scale Distributed Applications, IBM R...Network-aware Data Management for Large Scale Distributed Applications, IBM R...
Network-aware Data Management for Large Scale Distributed Applications, IBM R...
 
Lecture set 1
Lecture set 1Lecture set 1
Lecture set 1
 
Networking lecture1
Networking lecture1Networking lecture1
Networking lecture1
 
LAN Design and implementation of Shanto Mariam University of Creative Technology
LAN Design and implementation of Shanto Mariam University of Creative TechnologyLAN Design and implementation of Shanto Mariam University of Creative Technology
LAN Design and implementation of Shanto Mariam University of Creative Technology
 
Cloud interconnection networks basic .pptx
Cloud interconnection networks basic .pptxCloud interconnection networks basic .pptx
Cloud interconnection networks basic .pptx
 
Evolution of network - computer networks
Evolution of network - computer networksEvolution of network - computer networks
Evolution of network - computer networks
 
Computer Networks Lecture Notes
Computer Networks Lecture NotesComputer Networks Lecture Notes
Computer Networks Lecture Notes
 
Simulating the behavior of satellite Internet links to small islands
Simulating the behavior of satellite Internet links to small islandsSimulating the behavior of satellite Internet links to small islands
Simulating the behavior of satellite Internet links to small islands
 
1 introduction
1 introduction1 introduction
1 introduction
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
Presentation8
Presentation8Presentation8
Presentation8
 
DITEC - Fundamentals in Networking
DITEC - Fundamentals in NetworkingDITEC - Fundamentals in Networking
DITEC - Fundamentals in Networking
 
Dc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switchingDc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switching
 

More from Marco Tusa

Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Marco Tusa
 
My sql on kubernetes demystified
My sql on kubernetes demystifiedMy sql on kubernetes demystified
My sql on kubernetes demystified
Marco Tusa
 
Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...
Marco Tusa
 
MySQL innoDB split and merge pages
MySQL innoDB split and merge pagesMySQL innoDB split and merge pages
MySQL innoDB split and merge pages
Marco Tusa
 
Robust ha solutions with proxysql
Robust ha solutions with proxysqlRobust ha solutions with proxysql
Robust ha solutions with proxysql
Marco Tusa
 
Fortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleuFortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleu
Marco Tusa
 
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Marco Tusa
 
Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...
Marco Tusa
 
Improve aws withproxysql
Improve aws withproxysqlImprove aws withproxysql
Improve aws withproxysql
Marco Tusa
 
Fortify aws aurora_proxy
Fortify aws aurora_proxyFortify aws aurora_proxy
Fortify aws aurora_proxy
Marco Tusa
 
Mysql8 advance tuning with resource group
Mysql8 advance tuning with resource groupMysql8 advance tuning with resource group
Mysql8 advance tuning with resource group
Marco Tusa
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql sharding
Marco Tusa
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deployment
Marco Tusa
 
Sync rep aurora_2016
Sync rep aurora_2016Sync rep aurora_2016
Sync rep aurora_2016
Marco Tusa
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
Marco Tusa
 
Empower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instrumentsEmpower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instruments
Marco Tusa
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3
Marco Tusa
 
Plmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalPlmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_final
Marco Tusa
 
Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2
Marco Tusa
 
Discard inport exchange table & tablespace
Discard inport exchange table & tablespaceDiscard inport exchange table & tablespace
Discard inport exchange table & tablespace
Marco Tusa
 

More from Marco Tusa (20)

Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
 
My sql on kubernetes demystified
My sql on kubernetes demystifiedMy sql on kubernetes demystified
My sql on kubernetes demystified
 
Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...
 
MySQL innoDB split and merge pages
MySQL innoDB split and merge pagesMySQL innoDB split and merge pages
MySQL innoDB split and merge pages
 
Robust ha solutions with proxysql
Robust ha solutions with proxysqlRobust ha solutions with proxysql
Robust ha solutions with proxysql
 
Fortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleuFortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleu
 
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
 
Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...
 
Improve aws withproxysql
Improve aws withproxysqlImprove aws withproxysql
Improve aws withproxysql
 
Fortify aws aurora_proxy
Fortify aws aurora_proxyFortify aws aurora_proxy
Fortify aws aurora_proxy
 
Mysql8 advance tuning with resource group
Mysql8 advance tuning with resource groupMysql8 advance tuning with resource group
Mysql8 advance tuning with resource group
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql sharding
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deployment
 
Sync rep aurora_2016
Sync rep aurora_2016Sync rep aurora_2016
Sync rep aurora_2016
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
 
Empower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instrumentsEmpower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instruments
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3
 
Plmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalPlmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_final
 
Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2
 
Discard inport exchange table & tablespace
Discard inport exchange table & tablespaceDiscard inport exchange table & tablespace
Discard inport exchange table & tablespace
 

Recently uploaded

06-18-2024-Princeton Meetup-Introduction to Milvus
06-18-2024-Princeton Meetup-Introduction to Milvus06-18-2024-Princeton Meetup-Introduction to Milvus
06-18-2024-Princeton Meetup-Introduction to Milvus
Timothy Spann
 
reading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdf
reading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdfreading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdf
reading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdf
perranet1
 
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
nyvan3
 
社内勉強会資料_Hallucination of LLMs               .
社内勉強会資料_Hallucination of LLMs               .社内勉強会資料_Hallucination of LLMs               .
社内勉強会資料_Hallucination of LLMs               .
NABLAS株式会社
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
Márton Kodok
 
Namma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdf
Namma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdfNamma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdf
Namma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdf
22ad0301
 
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
Vietnam Cotton & Spinning Association
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
bmucuha
 
一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理
一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理
一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理
ywqeos
 
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
actyx
 
Template xxxxxxxx ssssssssssss Sertifikat.pptx
Template xxxxxxxx ssssssssssss Sertifikat.pptxTemplate xxxxxxxx ssssssssssss Sertifikat.pptx
Template xxxxxxxx ssssssssssss Sertifikat.pptx
TeukuEriSyahputra
 
一比一原版卡尔加里大学毕业证(uc毕业证)如何办理
一比一原版卡尔加里大学毕业证(uc毕业证)如何办理一比一原版卡尔加里大学毕业证(uc毕业证)如何办理
一比一原版卡尔加里大学毕业证(uc毕业证)如何办理
oaxefes
 
Drownings spike from May to August in children
Drownings spike from May to August in childrenDrownings spike from May to August in children
Drownings spike from May to August in children
Bisnar Chase Personal Injury Attorneys
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
mkkikqvo
 
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docxDATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
SaffaIbrahim1
 
Telemetry Solution for Gaming (AWS Summit'24)
Telemetry Solution for Gaming (AWS Summit'24)Telemetry Solution for Gaming (AWS Summit'24)
Telemetry Solution for Gaming (AWS Summit'24)
GeorgiiSteshenko
 
Econ3060_Screen Time and Success_ final_GroupProject.pdf
Econ3060_Screen Time and Success_ final_GroupProject.pdfEcon3060_Screen Time and Success_ final_GroupProject.pdf
Econ3060_Screen Time and Success_ final_GroupProject.pdf
blueshagoo1
 
一比一原版南昆士兰大学毕业证如何办理
一比一原版南昆士兰大学毕业证如何办理一比一原版南昆士兰大学毕业证如何办理
一比一原版南昆士兰大学毕业证如何办理
ugydym
 
[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024
Vietnam Cotton & Spinning Association
 
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
Timothy Spann
 

Recently uploaded (20)

06-18-2024-Princeton Meetup-Introduction to Milvus
06-18-2024-Princeton Meetup-Introduction to Milvus06-18-2024-Princeton Meetup-Introduction to Milvus
06-18-2024-Princeton Meetup-Introduction to Milvus
 
reading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdf
reading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdfreading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdf
reading_sample_sap_press_operational_data_provisioning_with_sap_bw4hana (1).pdf
 
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
 
社内勉強会資料_Hallucination of LLMs               .
社内勉強会資料_Hallucination of LLMs               .社内勉強会資料_Hallucination of LLMs               .
社内勉強会資料_Hallucination of LLMs               .
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
 
Namma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdf
Namma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdfNamma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdf
Namma-Kalvi-11th-Physics-Study-Material-Unit-1-EM-221086.pdf
 
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理
一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理
一比一原版(lbs毕业证书)伦敦商学院毕业证如何办理
 
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
 
Template xxxxxxxx ssssssssssss Sertifikat.pptx
Template xxxxxxxx ssssssssssss Sertifikat.pptxTemplate xxxxxxxx ssssssssssss Sertifikat.pptx
Template xxxxxxxx ssssssssssss Sertifikat.pptx
 
一比一原版卡尔加里大学毕业证(uc毕业证)如何办理
一比一原版卡尔加里大学毕业证(uc毕业证)如何办理一比一原版卡尔加里大学毕业证(uc毕业证)如何办理
一比一原版卡尔加里大学毕业证(uc毕业证)如何办理
 
Drownings spike from May to August in children
Drownings spike from May to August in childrenDrownings spike from May to August in children
Drownings spike from May to August in children
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
 
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docxDATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
DATA COMMS-NETWORKS YR2 lecture 08 NAT & CLOUD.docx
 
Telemetry Solution for Gaming (AWS Summit'24)
Telemetry Solution for Gaming (AWS Summit'24)Telemetry Solution for Gaming (AWS Summit'24)
Telemetry Solution for Gaming (AWS Summit'24)
 
Econ3060_Screen Time and Success_ final_GroupProject.pdf
Econ3060_Screen Time and Success_ final_GroupProject.pdfEcon3060_Screen Time and Success_ final_GroupProject.pdf
Econ3060_Screen Time and Success_ final_GroupProject.pdf
 
一比一原版南昆士兰大学毕业证如何办理
一比一原版南昆士兰大学毕业证如何办理一比一原版南昆士兰大学毕业证如何办理
一比一原版南昆士兰大学毕业证如何办理
 
[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics May 2024
 
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
 

Best practice-high availability-solution-geo-distributed-final

  • 1. Best Practice for Designing and Implementing MySQL Geographic Distributed, High Availability Solutions Marco Tusa Percona
  • 2. 2 • Open source enthusiast • MySQL tech lead; principal architect • Working in DB/development world over 33 years (yes, I am that old) • Open source developer and community contributor About Me
  • 3. 3 Why Are We Talking About Geographic Distribution? The need to have geographic distribution for…
  • 4. 3 Why Are We Talking About Geographic Distribution? The need to have geographic distribution for… Disaster Recovery
  • 5. 3 Why Are We Talking About Geographic Distribution? The need to have geographic distribution for… Disaster Recovery Data close to consumer/user
  • 6. 3 Why Are We Talking About Geographic Distribution? The need to have geographic distribution for… Disaster Recovery Data close to consumer/user Security by regulations/laws
  • 7. 3 Why Are We Talking About Geographic Distribution? The need to have geographic distribution for… Disaster Recovery Data close to consumer/user Security by regulations/laws
  • 8. 4 What is Geographic Distribution? ● What is geographic distribution? ○ Near ! High Availability ○ Far ! Disaster Recovery
  • 9. • Geographic distribution in High Availability is to cover service availability in a location ○ 10 Gb Ethernet best case scenario 400 metre distance max What is HA and What is DR?
  • 10. • Geographic distribution in Disaster Recovery is to assure we can restore service, in a geographically distributed location ○ Real speed may vary ○ Linear distance ~1000Km What is HA and What is DR?
  • 11. 7 The Impact of Distance on Geographic Distribution
  • 12. A Real-Life Example I worked on many cases where a customer had two data centers (DC). I will use information from one of the case as example. The DC were at a distance of approximately 400 km, connected with a “fiber channel”. Server 1 and Server 2 were hosted in the same DC, while Server 3 was in the secondary DC. Their ping to Server3 was ~3ms. Not bad at all, right? We decided to perform some serious tests, running multiple sets of tests with netperf for many days collecting data. We also used the data to perform additional fine-tuning on the TCP/IP layer AND at the network provider.
  • 14. Observations 37ms latency is not very high. If that had been the top limit, it would have worked. But, it was not. In the presence of the optimized channel, with fiber and so on, when the tests were hitting heavy traffic, the congestion was enough to compromise the data transmitted. It hit a latency >200ms for Server 3. Note those were spikes, but if you are in the presence of a tightly coupled database cluster, those events can become failures in applying the data, and can create a lot of instability.
  • 15. Facts About Server 3 The connection between the two was with fiber. Distance Km ~400 (~800), we need to double because of the round trip, we also receive packages. Theoretical time at light-speed =2.66ms (2 ways) Ping = 3.10ms (signal traveling at ~80% of the light speed) as if the signal had traveled ~930Km (full round trip 800 Km) TCP/IP best at 48K = 4.27ms (~62% light speed) as if the signal had traveled ~1,281km TCP/IP best at 512K =37.25ms (~2.6% light speed) as if the signal had traveled ~11,175km Given the above, we have from ~20%-~40% to ~97% loss from the theoretical transmission rate.
  • 16. TCP Encapsulation Max transportable 1500 MTU – IP Header – TCP Header 1500 – ~40 = 1460 bytes
  • 18. Some Numbers • With 8KB we need 6 IP Frames • With 40KB we need 28 IP Frames • With 387KB we need 271 IP Frames • With 1MB we need 718 IP Frames • With 4MB we need ~2,800 Frames All this if we use the full TCP capacity
  • 19. Which Solutions Are Available? 2 Models Tightly coupled database clusters • Datacentric approach (single state of the data, distributed commit) • Data is consistent in time cross nodes • Replication requires high performant link • Geographic distribution is forbidden • DR is not supported Loosely coupled database clusters • Single node approach (local commit) • Data state differs by node • Single node state does not affect the cluster • Replication link doesn’t need to be high performance • Geographic distribution is allowed • DR is supported
  • 20. Replicate Data is the Key - Sync vs Async 1 Data State 3 Different Data States Tightly coupled Loosely coupled
  • 21. 17 Which Implementations?: Primary - Secondary Replication by internal design Positive things: • Each node is independent • Read scale • Low network impact Negative things: • Stale reads • Low HA • Consistent only in the Primary • Each node has its own data state Loosely coupled
  • 22. 18 Replication by internal design Positive things: • Highly available • Read scale • Data is in almost in sync all of the time Negative things: • Doesn’t scale writes • More nodes = more internal overhead • Network is a very impacting factor • 1 Writer only (PLEASE!!!!!) Which Implementations?: PXC Tightly coupled
  • 23. 19 Which Implementations?: PS – Group Replication Replication by standard MySQL Positive things: • Highly available • Read scale • Data is in almost in sync all the time • More network tolerant Negative things: • Doesn’t scale writes • 1 Writer only (PLEASE!!!!!) Tightly coupled
  • 24. 20 Implementations by HA Level and Tight/Loose Relation
  • 25. 20 Implementations by HA Level and Tight/Loose Relation
  • 26. Architectures: What Should NOT Be Done 1 London West London East Frankfurt Node 1 Node 2 Node 3 Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 27. Architectures: What Should NOT Be Done 1 London West London East Frankfurt Node 1 Node 2 Node 3 Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 28. Slave Architectures: What Should NOT Be Done 2 London West London East Frankfurt Node 1 Node 2 Node 3 Secondary Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 29. Slave Architectures: What Should NOT Be Done 2 London West London East Frankfurt Node 1 Node 2 Node 3 Secondary Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 30. Architectures: What Can Be Done Slave London West London West (400 mt limit) Frankfurt Node 1 Node 2 Node 3 S-Node1 S-Node2 S-Node3 Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 31. Architectures: What Can Be Done Slave London West London West (400 mt limit) Frankfurt Node 1 Node 2 Node 3 S-Node1 S-Node2 S-Node3 Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 32. Architectures: What You Should Do Slave London Frankfurt Node 1 Node 2 Node 3 S-Node1 S-Node2 S-Node3 Sync High perf link Sync Internet link Async Internet link Sync High perf internet link
  • 33. Conclusion - a Healthy Solution Must have a business continuity plan and cover at least: ● HA ● DR (RTO) ● Backup/restore (RPO) ● Load distribution ● Correct monitoring/alerting
  • 34. Conclusion - a Healthy Solution* *I am showing PXC/Galera replication by convenience, but it could also be Percona Server with Group Replication
  • 35. Conclusion - a Healthy Solution Must have a business continuity plan and cover at least: ● HA → (PXC OR PS-GR) ● DR → (PXC OR PS-GR) with Asynchronous replication and RMP (replication manager for PXC/PS-GR) ● Backup/restore → Backup/restore policy ● Load distribution → ProxySQL with Query rules ● Correct monitoring/alerting → Percona Monitoring and Management (PMM)
  • 36. Useful References ● https://www.percona.com/blog/2018/11/15/mysql-high-availability-on-premises-a-geographically-distributed-scenario/ ● https://dev.mysql.com/doc/mysql-ha-scalability/en/ha-overview.html ● https://www.percona.com/blog/2014/11/17/typical-misconceptions-on-galera-for-mysql/ ● http://galeracluster.com/documentation-webpages/limitations.html ● http://tusacentral.net/joomla/index.php/mysql-blogs/170-geographic-replication-and-quorum-calculation-in-mysqlgalera.html ● http://tusacentral.net/joomla/index.php/mysql-blogs/167-geographic-replication-with-mysql-and-galera.html ● http://tusacentral.net/joomla/index.php/mysql-blogs/164-effective-way-to-check-the-network-connection-when-in-need-of-a- geographic-distribution-replication-.html ● http://tusacentral.net/joomla/index.php/mysql-blogs/183-proxysql-percona-cluster-galera-integration.html ● https://github.com/sysown/proxysql/wiki ● https://www.percona.com/blog/2018/11/15/how-not-to-do-mysql-high-availability-geographic-node-distribution-with-galera- based-replication-misuse/ ● https://github.com/y-trudeau/Mysql-tools/tree/master/PXC