SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Running Galera Cluster effectively
on Amazon Web Services (AWS)
and comparing it to RDS and Aurora
Colin Charles, colin.charles@galeracluster.com

30 July 2019

https://twitter.com/galeracluster | www.galeracluster.com 

Codership Webinar
Agenda
• Running Galera Cluster in the the Amazon Web Services cloud

• Using a proxy (e.g. ProxySQL) to load balance traffic and more

• Galera Cluster vs Amazon AWS RDS for MySQL / MariaDB Server

• Galera Cluster vs Amazon AWS RDS Aurora
Codership
• The developers and experts of Galera Cluster
• Established in 2007, 3 founders, all engineers

• Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect

• Services business model, producing 100% open source software

• Thousands of users in various industries: e-commerce, betting/gambling,
telecoms, banking, insurance, gaming, healthcare, media, marketing,
advertising, travel, education, software as a service, PaaS, IaaS, etc.
!3
!4
!5
Galera Cluster is all about multi-master replication
• Can be described as virtually synchronous replication

• High Availability with no data loss, and consistent data across all nodes — no Single Point of Failure (SPoF)

• Quorum based failure handling 

• Optimistic concurrency control

• 100% multi-master cluster (all nodes are equal in terms of having the data, so no lagging secondaries, 24/7
availability, etc.)

• This is a core feature of the product by design, has automatic transaction conflict detection and management,
and your application can issue any transaction to any Galera Cluster node. Works well in WAN/Clouds 

• Parallel replication

• You do not need automatic failovers via a framework, no need to designate single nodes for writes and the rest for
reads, configuration is simple, easier handling of scheduled downtime
!6
Galera Cluster optimised for the cloud
• Optimised network protocol as packets are only exchanged over the WAN at
transaction commit time

• Topology aware replication, so each transaction is sent to the data centre only
once

• Detection and automatic eviction of unreliable nodes

• eviction if due to network flaps or node failure, will not be able to rejoin without
manual intervention

• Split brain recovery/management

• Traffic encryption (key in the cloud)
!7
Regions & Availability Zones
• Region: a data centre location, containing multiple Availability Zones

• Availability Zone (AZ): isolated from failures from other AZs + low-latency
network connectivity to other zones in same region
!8
RDS: Multi-AZ
• Provides enhanced durability (synchronous data replication)

• Increased availability (automatic failover)

• Warning: can be slow with large database size

• Easy GUI administration

• Doesn’t give you another usable “read-replica” though
!9
Running Galera Cluster in the AWS EC2 cloud
• The why’s tend to be simple: Galera Cluster is not available on Amazon
Web Services

• For regular MySQL, you tend to get more configurability out of EC2 since
it is a base OS Linux 

• You may however have to pay a little more than just a standard RDS
instance
!10
Other considerations
• Location, location, location: AWS RDS: US East (N. Virginia, Ohio), US
West (Oregon, Northern California, California), EU (Ireland, Frankfurt,
London, Paris), APAC (Singapore, Tokyo, Sydney, Seoul, Mumbai),
South America (São Paulo), GovCloud, Canada (Central), China (Beijing)

• SLA’s: at least 99.95% in a calendar month, less than, 10% service credit

• Support: active forums; $100+ (or a % of AWS usage) phone #

• Management: self-management, Enterprise ($15k+)
!11
Other considerations II
• Backups:

• Amazon has automated backups (with point-in-time recovery), with full
daily snapshots (has a backup window). 

• Multi-AZ? Backup taken from the standby!

• Backup retention default? 1 day. Increase it

• Monitoring: AWS CloudWatch
!12
Costs!
• RDS M5 — db.m5.xlarge, 4 vCPUs, 16 GB RAM

• $0.171/hour, and $0.684/hour for multi-AZ

• EC2 M5 - m5.xlarge, 4 vCPUs, 16GB RAM

• $0.192/hour

• But for a fairer Aurora comparison, we should look at the memory-optimised R5 instances
(r5.large) — 2 vCPUs, 16GB RAM

• EC2: $0.126/hour

• RDS: $0.24/hour, and $0.48/hour for multi-AZ

• Aurora: $0.58/hour
!13
Costs II
• Monthly cost of running 3 EC2 r5.large instances with 100GB of storage:
$303.72 (minimal Galera Cluster, no proxies, etc.)

• Monthly cost of running 3 RDS db.r5.large instances with 100GB of
storage: $559.24 (one master, two secondaries)

• Monthly cost of running 1 RDS db.r5.large instance with 100GB of storage
with Multi-AZ: $374.36 (one master, one passive failover target)

• Monthly cost of running 1 RDS Aurora db.r5.large instance with 100GB of
storage: $219.98
!14
So…
• Who runs/manages Galera Cluster in an EC2 instance? You do.

• What does it take to run Galera Cluster in an EC2 instance? Not much
beyond the usual setup.

• Where do you run Galera Cluster in AWS? In an EC2 instance.

• When do you run Galera Cluster in AWS? When you feel the need for virtually
synchronous replication, automatic node management, etc.

• Why do you run Galera Cluster in AWS? For the features, of course!

• How do you run Galera Cluster in AWS? We’ll show you now
!15
!16
Security Groups
• SSH for login

• TCP for MySQL is 3306

• TCP ports for Galera Cluster is 4444 (incremental state transfers), 4567
(communications), 4568 (state snapshot transfers)

• UDP port for Galera Cluster is 4567 (communications)
!17
Security Groups
!18
SELinux & Firewalls
• setenforce 0

• However you can open ports for Galera Cluster:

• semanage port -a -t mysqld_port_t -p tcp 3306 / semange permissive -
a mysqld_t

• Similar for the firewall

• firewall-cmd --zone=public --add-service=mysql --permanent (add the
ports via —add-port=3306/tcp) / firewall-cmd —reload
!19
Proxies like ProxySQL
• This will take another instance

• Has native Galera Cluster hostgroup support

• Works with RDS & Aurora too

• https://aws.amazon.com/blogs/database/how-to-use-
proxysql-with-open-source-platforms-to-split-sql-
reads-and-writes-on-amazon-aurora-clusters/

• https://aws.amazon.com/blogs/database/supercharge-
your-amazon-rds-for-mysql-deployment-with-proxysql-
and-percona-monitoring-and-management/
!20
Amazon RDS
• Offers MySQL and MariaDB Server

• Limited feature set, i.e. you don’t get the MySQL 8 X Protocol, mysqlsh, in
MariaDB Server you don’t get the encryption, storage engines, etc.

• It is however fully managed for you

• It has an automatic upgrade window

• Everything can be done easily within a GUI… you tradeoff control of the
database for ease of use & management
!21
AWS Aurora
• Bigger instances work better

• Zero-downtime migration from RDS

• Metrics via CloudWatch, Connectors via
MariaDB

• 99.99% uptime

• MySQL 5.6.10 “fork”, no optimiser, not
traditional replication (but Aurora <->MySQL
works of course)

• MySQL 5.7.12 Aurora launched Feb
2018, with JSON support, spatial
indexes, generated columns, etc.

• Auto scaling - compute, memory, storage

• Replicas (15) for reads

• Automated backups in S3, DB snapshots

• Encryption with key server being Amazon
KMS

• Spatial data support - like InnoDB 5.7!

• Lab mode (hash joins, scan batching, etc.)
!22
Amazon RDS Aurora
• A little more compelling considering it replaces the replication layer

• Has Serverless function support

• Can do parallel query

• Beware that not all features exist in the 5.6 and 5.7 releases

• https://mariadb.com/resources/blog/four-things-you-didnt-know-about-
amazon-aurora/ 

• ageing outdated database, required downtime & interruption, lack of
enterprise security, least common denominator
!23
Underlying replication types
• RDS MySQL / MariaDB Server — DRBD

• RDS Aurora — physical replication

• roll-your-own Galera Cluster — virtually synchronous replication

• (only Google Cloud SQL uses semi-synchronous replication)

• automated services with asynchronous replication?
!24
Resources
• AWS Cost Calculator: https://calculator.s3.amazonaws.com/index.html

• 1 hour tutorial video on running Galera Cluster on AWS: https://
galeracluster.com/library-media/videos/galera-on-aws.mp4
!25
Things we should think about in the future…
• AWS Marketplace image to roll this out easier?

• Kubernetes support? 

• What else would you like?

• Benchmarks? (we got questions about RDS vs Multi-AZ vs Aurora vs roll-
your-own Galera Cluster)
!26
Questions?
Colin Charles, colin.charles@galeracluster.com

https://twitter.com/galeracluster | www.galeracluster.com
!27

Más contenido relacionado

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Destacado

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Running galera cluster effectively on amazon web services (aws) and comparing it to rds and aurora

  • 1. Running Galera Cluster effectively on Amazon Web Services (AWS) and comparing it to RDS and Aurora Colin Charles, colin.charles@galeracluster.com 30 July 2019 https://twitter.com/galeracluster | www.galeracluster.com Codership Webinar
  • 2. Agenda • Running Galera Cluster in the the Amazon Web Services cloud • Using a proxy (e.g. ProxySQL) to load balance traffic and more • Galera Cluster vs Amazon AWS RDS for MySQL / MariaDB Server • Galera Cluster vs Amazon AWS RDS Aurora
  • 3. Codership • The developers and experts of Galera Cluster • Established in 2007, 3 founders, all engineers • Seppo Jaakola, CEO, Teemu Ollakka, CTO, Alex Yurchenko, architect • Services business model, producing 100% open source software • Thousands of users in various industries: e-commerce, betting/gambling, telecoms, banking, insurance, gaming, healthcare, media, marketing, advertising, travel, education, software as a service, PaaS, IaaS, etc. !3
  • 4. !4
  • 5. !5
  • 6. Galera Cluster is all about multi-master replication • Can be described as virtually synchronous replication • High Availability with no data loss, and consistent data across all nodes — no Single Point of Failure (SPoF) • Quorum based failure handling • Optimistic concurrency control • 100% multi-master cluster (all nodes are equal in terms of having the data, so no lagging secondaries, 24/7 availability, etc.) • This is a core feature of the product by design, has automatic transaction conflict detection and management, and your application can issue any transaction to any Galera Cluster node. Works well in WAN/Clouds • Parallel replication • You do not need automatic failovers via a framework, no need to designate single nodes for writes and the rest for reads, configuration is simple, easier handling of scheduled downtime !6
  • 7. Galera Cluster optimised for the cloud • Optimised network protocol as packets are only exchanged over the WAN at transaction commit time • Topology aware replication, so each transaction is sent to the data centre only once • Detection and automatic eviction of unreliable nodes • eviction if due to network flaps or node failure, will not be able to rejoin without manual intervention • Split brain recovery/management • Traffic encryption (key in the cloud) !7
  • 8. Regions & Availability Zones • Region: a data centre location, containing multiple Availability Zones • Availability Zone (AZ): isolated from failures from other AZs + low-latency network connectivity to other zones in same region !8
  • 9. RDS: Multi-AZ • Provides enhanced durability (synchronous data replication) • Increased availability (automatic failover) • Warning: can be slow with large database size • Easy GUI administration • Doesn’t give you another usable “read-replica” though !9
  • 10. Running Galera Cluster in the AWS EC2 cloud • The why’s tend to be simple: Galera Cluster is not available on Amazon Web Services • For regular MySQL, you tend to get more configurability out of EC2 since it is a base OS Linux • You may however have to pay a little more than just a standard RDS instance !10
  • 11. Other considerations • Location, location, location: AWS RDS: US East (N. Virginia, Ohio), US West (Oregon, Northern California, California), EU (Ireland, Frankfurt, London, Paris), APAC (Singapore, Tokyo, Sydney, Seoul, Mumbai), South America (São Paulo), GovCloud, Canada (Central), China (Beijing) • SLA’s: at least 99.95% in a calendar month, less than, 10% service credit • Support: active forums; $100+ (or a % of AWS usage) phone # • Management: self-management, Enterprise ($15k+) !11
  • 12. Other considerations II • Backups: • Amazon has automated backups (with point-in-time recovery), with full daily snapshots (has a backup window). • Multi-AZ? Backup taken from the standby! • Backup retention default? 1 day. Increase it • Monitoring: AWS CloudWatch !12
  • 13. Costs! • RDS M5 — db.m5.xlarge, 4 vCPUs, 16 GB RAM • $0.171/hour, and $0.684/hour for multi-AZ • EC2 M5 - m5.xlarge, 4 vCPUs, 16GB RAM • $0.192/hour • But for a fairer Aurora comparison, we should look at the memory-optimised R5 instances (r5.large) — 2 vCPUs, 16GB RAM • EC2: $0.126/hour • RDS: $0.24/hour, and $0.48/hour for multi-AZ • Aurora: $0.58/hour !13
  • 14. Costs II • Monthly cost of running 3 EC2 r5.large instances with 100GB of storage: $303.72 (minimal Galera Cluster, no proxies, etc.) • Monthly cost of running 3 RDS db.r5.large instances with 100GB of storage: $559.24 (one master, two secondaries) • Monthly cost of running 1 RDS db.r5.large instance with 100GB of storage with Multi-AZ: $374.36 (one master, one passive failover target) • Monthly cost of running 1 RDS Aurora db.r5.large instance with 100GB of storage: $219.98 !14
  • 15. So… • Who runs/manages Galera Cluster in an EC2 instance? You do. • What does it take to run Galera Cluster in an EC2 instance? Not much beyond the usual setup. • Where do you run Galera Cluster in AWS? In an EC2 instance. • When do you run Galera Cluster in AWS? When you feel the need for virtually synchronous replication, automatic node management, etc. • Why do you run Galera Cluster in AWS? For the features, of course! • How do you run Galera Cluster in AWS? We’ll show you now !15
  • 16. !16
  • 17. Security Groups • SSH for login • TCP for MySQL is 3306 • TCP ports for Galera Cluster is 4444 (incremental state transfers), 4567 (communications), 4568 (state snapshot transfers) • UDP port for Galera Cluster is 4567 (communications) !17
  • 19. SELinux & Firewalls • setenforce 0 • However you can open ports for Galera Cluster: • semanage port -a -t mysqld_port_t -p tcp 3306 / semange permissive - a mysqld_t • Similar for the firewall • firewall-cmd --zone=public --add-service=mysql --permanent (add the ports via —add-port=3306/tcp) / firewall-cmd —reload !19
  • 20. Proxies like ProxySQL • This will take another instance • Has native Galera Cluster hostgroup support • Works with RDS & Aurora too • https://aws.amazon.com/blogs/database/how-to-use- proxysql-with-open-source-platforms-to-split-sql- reads-and-writes-on-amazon-aurora-clusters/ • https://aws.amazon.com/blogs/database/supercharge- your-amazon-rds-for-mysql-deployment-with-proxysql- and-percona-monitoring-and-management/ !20
  • 21. Amazon RDS • Offers MySQL and MariaDB Server • Limited feature set, i.e. you don’t get the MySQL 8 X Protocol, mysqlsh, in MariaDB Server you don’t get the encryption, storage engines, etc. • It is however fully managed for you • It has an automatic upgrade window • Everything can be done easily within a GUI… you tradeoff control of the database for ease of use & management !21
  • 22. AWS Aurora • Bigger instances work better • Zero-downtime migration from RDS • Metrics via CloudWatch, Connectors via MariaDB • 99.99% uptime • MySQL 5.6.10 “fork”, no optimiser, not traditional replication (but Aurora <->MySQL works of course) • MySQL 5.7.12 Aurora launched Feb 2018, with JSON support, spatial indexes, generated columns, etc. • Auto scaling - compute, memory, storage • Replicas (15) for reads • Automated backups in S3, DB snapshots • Encryption with key server being Amazon KMS • Spatial data support - like InnoDB 5.7! • Lab mode (hash joins, scan batching, etc.) !22
  • 23. Amazon RDS Aurora • A little more compelling considering it replaces the replication layer • Has Serverless function support • Can do parallel query • Beware that not all features exist in the 5.6 and 5.7 releases • https://mariadb.com/resources/blog/four-things-you-didnt-know-about- amazon-aurora/ • ageing outdated database, required downtime & interruption, lack of enterprise security, least common denominator !23
  • 24. Underlying replication types • RDS MySQL / MariaDB Server — DRBD • RDS Aurora — physical replication • roll-your-own Galera Cluster — virtually synchronous replication • (only Google Cloud SQL uses semi-synchronous replication) • automated services with asynchronous replication? !24
  • 25. Resources • AWS Cost Calculator: https://calculator.s3.amazonaws.com/index.html • 1 hour tutorial video on running Galera Cluster on AWS: https:// galeracluster.com/library-media/videos/galera-on-aws.mp4 !25
  • 26. Things we should think about in the future… • AWS Marketplace image to roll this out easier? • Kubernetes support? • What else would you like? • Benchmarks? (we got questions about RDS vs Multi-AZ vs Aurora vs roll- your-own Galera Cluster) !26