SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
CUSTOM NON-RDS MULTI-AZ
MYSQL REPLICATION
Cloudpack Night #6
5/17/2013
ABOUT ME (@IJIN)
• Michael H. Oshita
• Japanese American
• In Japan since 2002
• Software/Infra/Cloud Engineer
• http://ijin.github.io
CERTIFIEDTODAY!
COMPONENTS
• AWSVPC (Routing-Based HA Pattern)
• MySQL Master-Slave Replication
• MHA (Master HA Manager for MySQL)
• no RDS!!
MHA
Master
Slave
Slave
Manager
Manager detects failure on master
Master
Master
Slave
Manager
MHA
Slave is promoted to master after binlogs are applied
binlog
binlog
binlog
"Starting master failover."
"* Phase 1: Configuration Check Phase..n"
"* Phase 2: Dead Master Shutdown Phase..n"
==> Delete routing table (master_ip_failover)
"* Phase 3: Master Recovery Phase..n"
"* Phase 3.1: Getting Latest Slaves Phase..n"
"* Phase 3.2: Saving Dead Master's Binlog Phase..n"
"* Phase 3.3: Determining New Master Phase..n"
==> Change routing table (master_ip_failover)
"* Phase 4: Slaves Recovery Phase..n"
MHA
FAILOVER SEQUENCE
“SHARE A PRIVATE IP ACROSS AVAILABILITY ZONES”
http://d.hatena.ne.jp/c9katayama/20111225/1324837509
#ヤマン ++
• Storage engines & distributions
• Instance types
• Fast
• Efficient
WHY NOT RDS?
→ FLEXIBILITY!!
• Percona Server (XtraDB)
• MariaDB
• TokuDB
• Mroonga
STORAGE ENGINES &
DISTRIBUTIONS
• hi1.xlarge
• m3.xlarge
• c1.xlarge
• etc.
INSTANCETYPES
• RoutingTable changes pretty quickly
• Total failover in roughly <20s (RDS takes 3-6m)
• Non-DNS based
• Apps can be configured with a single IP
• no need to worry about internal DNS problems
FAST FAILOVER
• Minimum of 2 (web+db) servers
• Warm up (replication booster)
• Fine tuning
• Server Logs
EFFECIENT
DEMO
CONSIDERATIONS
• Backups → Xtrabackup, copy binlogs to s3
• Point inTime Recovery → Automate with Chef
• Provisioning Replicas → Automate with Chef
• Some learning curve
• API backplane a SPoF
THANKYOU!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Ansible intro
Ansible introAnsible intro
Ansible intro
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshop
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
 
Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!
Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!
Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
Using Ansible for Deploying to Cloud Environments
Using Ansible for Deploying to Cloud EnvironmentsUsing Ansible for Deploying to Cloud Environments
Using Ansible for Deploying to Cloud Environments
 
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
 
Jenkins and ansible reference
Jenkins and ansible referenceJenkins and ansible reference
Jenkins and ansible reference
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Network Automation with Ansible
Network Automation with AnsibleNetwork Automation with Ansible
Network Automation with Ansible
 
Ansible for beginners ...?
Ansible for beginners ...?Ansible for beginners ...?
Ansible for beginners ...?
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practices
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
 
Cyansible
CyansibleCyansible
Cyansible
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)
 

Andere mochten auch

Aws lambda-beware-of-escapes
Aws lambda-beware-of-escapesAws lambda-beware-of-escapes
Aws lambda-beware-of-escapes
Michael H. Oshita
 
JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上
JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上
JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上
Hiroshi Koyama
 
EC2でkeepalived+LVS(DSR)
EC2でkeepalived+LVS(DSR)EC2でkeepalived+LVS(DSR)
EC2でkeepalived+LVS(DSR)
Sugawara Genki
 
VietRees_Newsletter_51_Tuan1_Thang10
VietRees_Newsletter_51_Tuan1_Thang10VietRees_Newsletter_51_Tuan1_Thang10
VietRees_Newsletter_51_Tuan1_Thang10
internationalvr
 
Jardines 16908
Jardines 16908Jardines 16908
Jardines 16908
Marinesita
 
Diktatoren, Twitteraccounts und SOLIDes Design
Diktatoren, Twitteraccounts und SOLIDes DesignDiktatoren, Twitteraccounts und SOLIDes Design
Diktatoren, Twitteraccounts und SOLIDes Design
Bernd Schiffer
 

Andere mochten auch (20)

Aws lambda-beware-of-escapes
Aws lambda-beware-of-escapesAws lambda-beware-of-escapes
Aws lambda-beware-of-escapes
 
MHA, Murakumo & Me
MHA, Murakumo & MeMHA, Murakumo & Me
MHA, Murakumo & Me
 
JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上
JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上
JAWS-UG函館 S3とCloudFrontを利用してWebサイトの性能向上
 
Jaws ug青森 第1回勉強会 「awsと野菜と私」
Jaws ug青森 第1回勉強会 「awsと野菜と私」Jaws ug青森 第1回勉強会 「awsと野菜と私」
Jaws ug青森 第1回勉強会 「awsと野菜と私」
 
20130519 JAWS-UG青森 美人CDP/CDP男子「も」2.0へ
20130519 JAWS-UG青森 美人CDP/CDP男子「も」2.0へ20130519 JAWS-UG青森 美人CDP/CDP男子「も」2.0へ
20130519 JAWS-UG青森 美人CDP/CDP男子「も」2.0へ
 
20130520 実例で見るAWSの特徴と活用方法@JAWS-UG青森 第1回勉強会
20130520 実例で見るAWSの特徴と活用方法@JAWS-UG青森 第1回勉強会20130520 実例で見るAWSの特徴と活用方法@JAWS-UG青森 第1回勉強会
20130520 実例で見るAWSの特徴と活用方法@JAWS-UG青森 第1回勉強会
 
Puppet on AWS
Puppet on AWSPuppet on AWS
Puppet on AWS
 
クラウドで管理する手作り育苗ハウスのつくり方
クラウドで管理する手作り育苗ハウスのつくり方クラウドで管理する手作り育苗ハウスのつくり方
クラウドで管理する手作り育苗ハウスのつくり方
 
EC2でkeepalived+LVS(DSR)
EC2でkeepalived+LVS(DSR)EC2でkeepalived+LVS(DSR)
EC2でkeepalived+LVS(DSR)
 
VietRees_Newsletter_51_Tuan1_Thang10
VietRees_Newsletter_51_Tuan1_Thang10VietRees_Newsletter_51_Tuan1_Thang10
VietRees_Newsletter_51_Tuan1_Thang10
 
HAProxyでMySQL HA on Amazon EC2
HAProxyでMySQL HA on Amazon EC2HAProxyでMySQL HA on Amazon EC2
HAProxyでMySQL HA on Amazon EC2
 
Jardines 16908
Jardines 16908Jardines 16908
Jardines 16908
 
Diktatoren, Twitteraccounts und SOLIDes Design
Diktatoren, Twitteraccounts und SOLIDes DesignDiktatoren, Twitteraccounts und SOLIDes Design
Diktatoren, Twitteraccounts und SOLIDes Design
 
Tetalab
TetalabTetalab
Tetalab
 
How to Piss Off Your Pair at LAST Conference 2015
How to Piss Off Your Pair at LAST Conference 2015How to Piss Off Your Pair at LAST Conference 2015
How to Piss Off Your Pair at LAST Conference 2015
 
REST化的工作流
REST化的工作流REST化的工作流
REST化的工作流
 
Scrummaster Needed Desperately at 2016 Scrum Australia
Scrummaster Needed Desperately at 2016 Scrum AustraliaScrummaster Needed Desperately at 2016 Scrum Australia
Scrummaster Needed Desperately at 2016 Scrum Australia
 
Concrete Experimentation in Agile Environments at Agile Australia 2015
Concrete Experimentation in Agile Environments at Agile Australia 2015Concrete Experimentation in Agile Environments at Agile Australia 2015
Concrete Experimentation in Agile Environments at Agile Australia 2015
 
Always Run A Changing System
Always Run A Changing SystemAlways Run A Changing System
Always Run A Changing System
 
004
004004
004
 

Ähnlich wie Custom Non-RDS Multi-AZ Mysql Replication

MHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirksMHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirks
Colin Charles
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Lenz Grimmer
 
Infrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxInfrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black Box
Miklos Szel
 
N:1 Replication meets MHA
N:1 Replication meets MHAN:1 Replication meets MHA
N:1 Replication meets MHA
do_aki
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Lenz Grimmer
 
Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02
Louis liu
 

Ähnlich wie Custom Non-RDS Multi-AZ Mysql Replication (20)

OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started...
OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started...OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started...
OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started...
 
Has MySQL grown up?
Has MySQL grown up?Has MySQL grown up?
Has MySQL grown up?
 
Mysql replication @ gnugroup
Mysql replication @ gnugroupMysql replication @ gnugroup
Mysql replication @ gnugroup
 
MHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirksMHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirks
 
MySQL Spider Architecture
MySQL Spider ArchitectureMySQL Spider Architecture
MySQL Spider Architecture
 
Spider Setup with AWS/sandbox
Spider Setup with AWS/sandboxSpider Setup with AWS/sandbox
Spider Setup with AWS/sandbox
 
OSDC 2017 | Lessons from database failures by Colin Charles
OSDC 2017 | Lessons from database failures by Colin CharlesOSDC 2017 | Lessons from database failures by Colin Charles
OSDC 2017 | Lessons from database failures by Colin Charles
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 
视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)视觉中国的MongoDB应用实践(QConBeijing2011)
视觉中国的MongoDB应用实践(QConBeijing2011)
 
Lessons from database failures
Lessons from database failures Lessons from database failures
Lessons from database failures
 
Automated MySQL failover with MHA: Getting started & moving past its quirks
Automated MySQL failover with MHA: Getting started & moving past its quirksAutomated MySQL failover with MHA: Getting started & moving past its quirks
Automated MySQL failover with MHA: Getting started & moving past its quirks
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Infrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxInfrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black Box
 
N:1 Replication meets MHA
N:1 Replication meets MHAN:1 Replication meets MHA
N:1 Replication meets MHA
 
Galera webinar migration to galera cluster from my sql async replication
Galera webinar migration to galera cluster from my sql async replicationGalera webinar migration to galera cluster from my sql async replication
Galera webinar migration to galera cluster from my sql async replication
 
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's ToolchestMaking MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02Mysqlhacodebits20091203 1260184765-phpapp02
Mysqlhacodebits20091203 1260184765-phpapp02
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Custom Non-RDS Multi-AZ Mysql Replication