SlideShare a Scribd company logo
1 of 49
Download to read offline
Automated MySQL failover
with MHA: getting started &
moving past its quirks	

Colin Charles,Team MariaDB, SkySQL Ab	

colin@mariadb.org | byte@bytebot.net 	

http://mariadb.org/	

http://bytebot.net/blog/ | @bytebot on Twitter	

Open Source Data Centre Conference, Berlin,
Germany - 10 April 2014
whoami
• Work on MariaDB at SkySQL Ab	

• Merged with Monty Program Ab, makers of MariaDB	

• Formerly MySQL AB (exit: Sun Microsystems)	

• Past lives include Fedora Project (FESCO), OpenOffice.org	

• MHA experience	

• since November 2011 (MHA 0.52)	

• NRE work to make it run in a Solaris 10 environment... with no
Internet access!	

• Continued deployment advice + work for data centre use	

• Much thanks to SkySQL for the experience
Aims
• Why MHA?	

• What does MHA do?	

• How does MHA do it?	

• Running MHA,VIP failover, integration, etc	

• Who uses MHA?	

• Is fully automated failover a good idea?
Why this talk
• High Performance MySQL,
3rd Edition	

• Published: March 16 2012
But first... MySQL
replication
• Single master, multiple slave architecture	

• When master is unavailable, writes stop being accepted	

• Promoting a new master is not that easy	

• New master needs to wait to apply all relay log events	

• Slaves need to be consistent	

• MySQL clients need to reconnect to new master	

• All slaves need to start replication from proper binlog
position
Where did MHA come
from?
• DeNA won 2011 MySQL
Community Contributor of the
Year (April 2011)	

• MHA came in about 3Q/2011	

• Written byYoshinori Matsunobu,
Oracle ACE Director
What is MHA?
• MHA for MySQL: Master High Availability
Manager tools for MySQL	

• Goal: automating master failover & slave
promotion with minimal downtime	

• Set of Perl scripts	

• http://code.google.com/p/mysql-master-ha/
Why MHA?
• Automating monitoring of your replication topology for master
failover	

• Scheduled online master switching to a different host for online
maintenance	

• Switch back after OPTIMIZE/ALTER table, software or
hardware upgrade	

• Schema changes without stopping services	

• pt-online-schema-change, oak-online-alter-table, Facebook
OSC	

• Interactive/non-interactive master failover (just for failover, with
detection of master failure +VIP takeover to Pacemaker)
Why is master failover
hard?
• When master fails, no more
writes till failover complete	

• MySQL replication is
asynchronous (MHA works with
async + semi-sync replication)	

• slave2 is latest, slave1+3 have
missing events, MHA does:	

• copy id=10 from master if
possible	

• apply all missing events
Semi-sync replication
• If master crashes (or is shutdown :P), MHA cannot
save binlogs, latest data is lost	

• Minimises risk of binlog event existing only on
crashed master	

• Guarantees at least one slave receives binlog
events at commit	

• http://code.google.com/p/mysql-master-ha/wiki/
UseCases#Using_together_with_Semi-
Synchronous_Replication
MHA:Typical scenario
• Monitor replication topology	

• If failure detected on master, immediately
switch to a candidate master or the most
current slave to become new master	

• MHA must fail to connect to master server
three times 	

• CHANGE MASTER for all slaves to new master	

• Print (stderr)/email report, stop monitoring
So really, what does
MHA do?
Typical timeline
• Usually no more than 10-30 seconds	

• 0-10s: Master failover detected in around 10
seconds	

• (optional) check connectivity via secondary
network	

• (optional) 10-20s: 10 seconds to power off master	

• 10-20s: apply differential relay logs to new master	

• Practice: 4s @ DeNA, usually less than 30s
How does MHA work?
• Save binlog events from crashed master	

• Identify latest slave	

• Apply differential relay log to other slaves	

• Apply saved binlog events from master	

• Promote a slave to new master	

• Make other slaves replicate from new master
Getting Started
• MHA requires no changes to
your application	

• You are of course to write
to a virtual IP (VIP) for your
master	

• MHA does not build
replication environments for
you - that’s DIY
MHA Node
• Download mha4mysql-node & install
this on all machines: master, slaves, monitor	

• Packages (DEB, RPM) available	

• Manually, make sure you have
DBD::mysql & ensure it knows the path
of your MySQL
What’s in MHA node
• save_binary_logs - save & copy
master’s binlogs	

• apply_diff_relay_logs - find
differential relay log events & apply missing
events	

• purge_relay_logs - purge relay log
files
MHA Manager server
• Monitor server doesn’t have to be powerful
at all, just remain up	

• This is a single-point-of-failure so monitor
the manager server where MHA Manager
gets installed	

• If MHA Manager isn’t running, your app still
runs, but automated failover is now
disabled
MHA Manager
• You must install mha4mysql-node then
mha4mysql-manager 	

• Manager server has many Perl dependencies:
DBD::mysql, Config::Tiny,
Log::Dispatch,
Parallel::ForkManager, Time::HiRes
• Package management fixes dependencies, else use
CPAN
Configuring MHA
• Application configuration file: see
samples/conf/app1.cnf	

• Place this in /etc/MHA/app1.cnf	

• Global configuration file: see /etc/MHA/
masterha_default.cnf (see
samples/conf/
masterha_default.cnf)
app1.cnf
[server default]
manager_workdir=/var/log/masterha/app1
manager_log=/var/log/masterha/app1/manager.log
!
[server1]
hostname=host1
!
[server2]
hostname=host2
candidate_master=1
!
[server3]
hostname=host3
!
[server4]
hostname=host4
no_master=1
no need to specify
master as
MHA auto-detects this
sets priority, but doesn’t necessarily
mean it gets promoted
as a default (say its too far behind
replication).
But maybe this is a more powerful box,
or has a better setup
will never be the master. RAID0 instead
of RAID1+0?
Slave is in another data centre?
masterha_default.cnf
[server default]
user=root
password=rootpass
ssh_user=root
master_binlog_dir= /var/lib/mysql,/var/log/mysql
remote_workdir=/data/log/masterha
ping_interval=3
# secondary_check_script=masterha_secondary_check -s remote_host1 -s
remote_host2
# master_ip_failover_script= /script/masterha/master_ip_failover
# shutdown_script= /script/masterha/power_manager
# report_script= /script/masterha/send_report
# master_ip_online_change_script= /script/masterha/master_ip_online_change
check master activity
from
manager->remote_hostN-
>
master (multiple hosts to
ensure its not a network
issue)
STONITH
MHA uses SSH
• MHA uses SSH actively; passphraseless login	

• In theory, only require Manager SSH to all
nodes	

• However, remember
masterha_secondary_check
•masterha_check_ssh --conf=/
etc/MHA/app1.cnf
Check replication
•masterha_check_repl --conf=/etc/
MHA/app1.cnf
• If you don’t see MySQL Replication Health is
OK, MHA will fail	

• Common errors? Master binlog in different
position, read privileges on binary/relay log not
granted, using multi-master replication w/o read-
only=1 set (only 1 writable master allowed)
MHA Manager
•masterha_manager --conf=/etc/
MHA/app1.cnf
• Logs are printed to stderr by default, set
manager_log	

• Recommended running with nohup, or
daemontools (preferred in production)	

• http://code.google.com/p/mysql-master-ha/wiki/
Runnning_Background
So, the MHA Playbook
• Install MHA node, MHA manager	

•masterha_check_ssh --conf=/etc/
app1.cnf
•masterha_check_repl --conf=/etc/
app1.cnf
•masterha_manager --conf=/etc/
app1.cnf
• That’s it!
master_ip_failover_scri
pt
• Pacemaker can monitor & takeoverVIP if required 	

• Can use a catalog database	

• map between application name + writer/reader
IPs	

• SharedVIP is easy to implement with minimal
changes to master_ip_failover itself
(however, use shutdown_script to power off
machine)
master_ip_online_chan
ge
• Similar to master_ip_failover script, but
used for online maintenance	

•masterha_master_switch --
master_state=alive
• MHA executes FLUSH TABLES WITH
READ LOCK after the writing freeze
Test the failover
•masterha_check_status --
conf=/etc/MHA/app1.cnf
• Kill MySQL (kill -9, shutdown server, kernel
panic)	

• MHA should go thru failover (stderr)	

• parse the log as well	

• Upon completion, it stops running
masterha_master_switc
h
• Manual failover	

•--master_state=dead
• Scheduled online master switchover	

• Great for upgrades to server, etc.	

•masterha_master_switch --
master_state=alive --conf=/etc/
MHA/app1.cnf --
new_master_host=host2
HandlingVIPs
my $vip = ‘192.168.0.1/24”;
my $interface = “0”;
my $ssh_start_vip = “sudo /sbin/ifconfig eth0:$key $vip”;
my $ssh_stop_vip = “sudo /sbin/ifconfig eth0:$key down”;
...
sub start_vip() {
`ssh $ssh_user@$new_master_host ” $ssh_start_vip ”`; }
sub stop_vip() {
`ssh $ssh_user@$orig_master_host ” $ssh_stop_vip ”`; }
Integration with other
HA solutions
• Pacemaker	

• on RHEL6, you need some HA add-on, just use the
CentOS packages	

• /etc/ha.d/haresources to configureVIP	

•`masterha_master_switch --
master_state=dead --interactive=0 --
wait_on_failover_error=0 --
dead_master_host=host1 --
new_master_host=host2`
• Corosync + Pacemaker works well
Solaris
• MHA tested to work on Linux and Solaris 10 & greater	

• Use a .pkg MySQL	

• Solaris 10 needs a compiler (SolarisStudio - register w/
Oracle to download)	

• CPAN: manual builds of dependencies	

• Solaris doesn’t have md5sum (call md5)	

• Solaris ssh isn’t OpenSSH, missing some features like
ConnectionTimeout
What about replication
delay?
• By default, MHA checks to see if slave is behind
master. By more than 100MB, it is never a candidate
master	

• If you have candidate_master=1 set, consider
setting check_repl_delay=0
• You can integrate it with pt-heartbeat from
Percona Toolkit	

• http://www.percona.com/doc/percona-toolkit/2.1/
pt-heartbeat.html
MHA deployment tips
• When testing, you really should install this as root	

• SSH needs to work across all hosts	

• If you don’t want plaintext passwords in config files, use
init_conf_load_script	

• Each monitor can monitor multiple MHA pairs (hence app1, app2, etc.)	

• You can have a standby master, make sure its read-only	

• By default, master1->master2->slave3 doesn’t work	

• MHA manages master1->master2 without issue	

• Use multi_tier_slave=1 option	

• Make sure replication user exists on candidate master too!
Alternate solutions
• Heartbeat + DRBD	

• Costs $$$ -> passive master	

• innodb_flush_log_at_trx_commit=1, sync_binlog=1 is
expensive in MySQL	

• http://www.mysqlperformanceblog.com/
2008/06/02/how-much-overhead-drdb-could-cause/	

• MariaDB 5.3/5.5 or Percona Server 5.5 or MySQL 5.6
mitigate this by having group commit in the binary log
Alternate solutions II
• MySQL NDB Cluster	

• Galera Cluster	

• MariaDB Galera Cluster, Percona XtraDB
Cluster	

• Percona Replication Manager (PRM)	

• https://raw.github.com/y-trudeau/resource-
agents-prm/master/heartbeat/mysql	

• Tungsten Replicator
mysqlfailover
• mysqlfailover from mysql-utilities using GTID’s in 5.6	

• target topology: 1 master, n-slaves	

• enable: log-slave-updates, report-host, report-port, master-
info-table=TABLE	

• modes: elect (choose candidate from list), auto (default), fail	

• --discover-slaves-login for topology discovery	

• monitoring node: SPoF	

• Errant transactions prevent failover!	

• Restart node? Rejoins replication topology, as a slave.
MariaDB 10
• New slave: SET GLOBAL GTID_SLAVE_POS =
BINLOG_GTID_POS("masterbin.00024", 1600);
CHANGE MASTER TO master_host="10.2.3.4",
master_use_gtid=slave_pos; START SLAVE;	

• use GTID: STOP SLAVE

CHANGE MASTER TO
master_use_gtid=current_pos; START SLAVE;	

• Change master: STOP SLAVE

CHANGE MASTER TO master_host="10.2.3.5";
START SLAVE;
Where is MHA used
• DeNA	

• Premaccess (Swiss HA hosting company)	

• Ireland’s national TV & radio service	

• Jetair Belgium (MHA + MariaDB!)	

• Samsung	

• SK Group	

• DAPA	

• Facebook
MHA 0.56 is out now!
• MHA 0.56 released April 1 2014 (0.55:
December 12 2012)	

• http://code.google.com/p/mysql-master-ha/
wiki/ReleaseNotes
MHA 0.56
• 5.6 GTID: GTID + auto position enabled? Failover
with GTID SQL syntax not relay log failover	

• MariaDB 10 needs work	

• MySQL 5.6 support for checksum in binlog events
+ multi-threaded slaves	

• mysqlbinlog and mysql in custom locations
(configurable clients)	

• binlog streaming server supported
MHA 0.56
• ping_type = INSERT (for master connectivity
checks - assuming master isn’t accepting
writes)	

• future	

• Ship MHA resource agent - http://
www.skysql.com/downloads/mha-master-
high-availability	

• MariaDB 10 gtid handling
Is fully automated
failover a good idea?
• False alarms	

• Can cause short downtime, restarting all write connections	

• Repeated failover	

• Problem not fixed? Master overloaded?	

• MHA ensures a failover doesn’t happen within 8h, unless --
last_failover_minute=n is set	

• Data loss	

• id=103 is latest, relay logs are at id=101, loss	

• group commit means sync_binlog=1, innodb_flush_log_at_trx_commit=1 can
be enabled! (just wait for master to recover)	

• Split brain	

• sometimes poweroff takes a long time
Support
• SkySQL: www.skysql.com	

• Percona: www.percona.com	

• PalominoDB: www.palominodb.com 	

• AccelerationDB: www.accelerationdb.com
Automated tools to
play with
• 4-hostVagrant setup for MySQL MHA	

• https://github.com/hholzgra/vagrant-mysql-mha	

• Palomino Cluster Tool	

• https://github.com/time-palominodb/
PalominoClusterTool	

• Ansible playbooks for MHA	

• 4-hostVagrant setup for MHA	

• https://github.com/lefred/vagrant-mha
Video resources
• Yoshinori Matsunobu talking about High
Availability & MHA at Oracle MySQL day	

• http://www.youtube.com/watch?
v=CNCALAw3VpU	

• Alex Alexander (AccelerationDB) talks about
MHA, with an example of failover, and how it
compares to Tungsten	

• http://www.youtube.com/watch?
v=M9vVZ7jWTgw
References
• Design document	

• http://www.slideshare.net/matsunobu/automated-master-
failover	

• Configuration parameters	

• http://code.google.com/p/mysql-master-ha/wiki/Parameters	

• JetAir MHA use case	

• http://www.percona.com/live/mysql-conference-2012/sessions/
case-study-jetair-dramatically-increasing-uptime-mha	

• MySQL binary log	

• http://dev.mysql.com/doc/internals/en/binary-log.html
Q&A
colin@mariadb.org | byte@bytebot.net 	

http://skysql.com/ | http://mariadb.org/ 	

twitter: @bytebot | url: http://bytebot.net/blog/

More Related Content

What's hot

Understanding salt modular sub-systems and customization
Understanding salt   modular sub-systems and customizationUnderstanding salt   modular sub-systems and customization
Understanding salt modular sub-systems and customizationjasondenning
 
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
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisRicard Clau
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016effie mouzeli
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsSaltStack
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7Olivier DASINI
 
Introduction to Systems Management with SaltStack
Introduction to Systems Management with SaltStackIntroduction to Systems Management with SaltStack
Introduction to Systems Management with SaltStackCraig Sebenik
 
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 ToolchestLenz Grimmer
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityOSSCube
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedTim Callaghan
 
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStackSaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStackSaltStack
 
Alibaba patches in MariaDB
Alibaba patches in MariaDBAlibaba patches in MariaDB
Alibaba patches in MariaDBLixun Peng
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowMatt Ray
 
London devops logging
London devops loggingLondon devops logging
London devops loggingTomas Doran
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionJoshua Thijssen
 
SUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDBSUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDBMariaDB plc
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High AvailabilityColin Charles
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability SolutionsLenz Grimmer
 
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningAlbert Chen
 

What's hot (20)

Understanding salt modular sub-systems and customization
Understanding salt   modular sub-systems and customizationUnderstanding salt   modular sub-systems and customization
Understanding salt modular sub-systems and customization
 
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
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7
 
Introduction to Systems Management with SaltStack
Introduction to Systems Management with SaltStackIntroduction to Systems Management with SaltStack
Introduction to Systems Management with SaltStack
 
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
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStackSaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
 
Alibaba patches in MariaDB
Alibaba patches in MariaDBAlibaba patches in MariaDB
Alibaba patches in MariaDB
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
 
London devops logging
London devops loggingLondon devops logging
London devops logging
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
 
SUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDBSUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDB
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High Availability
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
 

Viewers also liked

OSDC 2014: Schlomo Schapiro - Test Driven Infrastructure
OSDC 2014: Schlomo Schapiro -  Test Driven InfrastructureOSDC 2014: Schlomo Schapiro -  Test Driven Infrastructure
OSDC 2014: Schlomo Schapiro - Test Driven InfrastructureNETWAYS
 
OSDC 2014: Jordan Sissel - Find Happiness in your Logs
 OSDC 2014: Jordan Sissel - Find Happiness in your Logs OSDC 2014: Jordan Sissel - Find Happiness in your Logs
OSDC 2014: Jordan Sissel - Find Happiness in your LogsNETWAYS
 
OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2
OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2
OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2NETWAYS
 
OSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin Parm
OSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin ParmOSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin Parm
OSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin ParmNETWAYS
 
Docker Hosting (Webinar vom 10. März 2016)
Docker Hosting (Webinar vom 10. März 2016)Docker Hosting (Webinar vom 10. März 2016)
Docker Hosting (Webinar vom 10. März 2016)NETWAYS
 
Seeking Sunshine in Cloud Technology - Spectrum 2014
Seeking Sunshine in Cloud Technology - Spectrum 2014Seeking Sunshine in Cloud Technology - Spectrum 2014
Seeking Sunshine in Cloud Technology - Spectrum 2014Roger Renteria
 
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker NETWAYS
 
Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...
Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...
Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...NETWAYS
 
Internet Marketing Services at IEMLabs
Internet Marketing Services  at IEMLabsInternet Marketing Services  at IEMLabs
Internet Marketing Services at IEMLabsIEMLabs
 
OSDC 2014: Michael Renner - Secure encryption in a wiretapped future
OSDC 2014: Michael Renner - Secure encryption in a wiretapped futureOSDC 2014: Michael Renner - Secure encryption in a wiretapped future
OSDC 2014: Michael Renner - Secure encryption in a wiretapped futureNETWAYS
 
Intimate details signature experience collage
Intimate details signature experience collageIntimate details signature experience collage
Intimate details signature experience collagermmiddleton
 
08 sip database
08 sip database08 sip database
08 sip databaseIkhsan Bz
 
Mobile application development – An essential for all businesses
Mobile application development – An essential for all businessesMobile application development – An essential for all businesses
Mobile application development – An essential for all businessesIEMLabs
 
Iconic Life Magazine Iconic Launch
Iconic Life Magazine Iconic LaunchIconic Life Magazine Iconic Launch
Iconic Life Magazine Iconic Launchrmmiddleton
 

Viewers also liked (16)

OSDC 2014: Schlomo Schapiro - Test Driven Infrastructure
OSDC 2014: Schlomo Schapiro -  Test Driven InfrastructureOSDC 2014: Schlomo Schapiro -  Test Driven Infrastructure
OSDC 2014: Schlomo Schapiro - Test Driven Infrastructure
 
OSDC 2014: Jordan Sissel - Find Happiness in your Logs
 OSDC 2014: Jordan Sissel - Find Happiness in your Logs OSDC 2014: Jordan Sissel - Find Happiness in your Logs
OSDC 2014: Jordan Sissel - Find Happiness in your Logs
 
OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2
OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2
OSDC 2014: Lennart Koopmann - Log Analysis with Graylog2
 
OSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin Parm
OSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin ParmOSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin Parm
OSMC 2015: Monitoring at Spotify-When things go ping in the night by Martin Parm
 
Docker Hosting (Webinar vom 10. März 2016)
Docker Hosting (Webinar vom 10. März 2016)Docker Hosting (Webinar vom 10. März 2016)
Docker Hosting (Webinar vom 10. März 2016)
 
Seeking Sunshine in Cloud Technology - Spectrum 2014
Seeking Sunshine in Cloud Technology - Spectrum 2014Seeking Sunshine in Cloud Technology - Spectrum 2014
Seeking Sunshine in Cloud Technology - Spectrum 2014
 
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
 
ask4school
ask4schoolask4school
ask4school
 
ask4school
ask4schoolask4school
ask4school
 
Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...
Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...
Open Source Backup Conference 2014: Bareos in scientific environments, by Jan...
 
Internet Marketing Services at IEMLabs
Internet Marketing Services  at IEMLabsInternet Marketing Services  at IEMLabs
Internet Marketing Services at IEMLabs
 
OSDC 2014: Michael Renner - Secure encryption in a wiretapped future
OSDC 2014: Michael Renner - Secure encryption in a wiretapped futureOSDC 2014: Michael Renner - Secure encryption in a wiretapped future
OSDC 2014: Michael Renner - Secure encryption in a wiretapped future
 
Intimate details signature experience collage
Intimate details signature experience collageIntimate details signature experience collage
Intimate details signature experience collage
 
08 sip database
08 sip database08 sip database
08 sip database
 
Mobile application development – An essential for all businesses
Mobile application development – An essential for all businessesMobile application development – An essential for all businesses
Mobile application development – An essential for all businesses
 
Iconic Life Magazine Iconic Launch
Iconic Life Magazine Iconic LaunchIconic Life Magazine Iconic Launch
Iconic Life Magazine Iconic Launch
 

Similar to OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started & moving past its quirks

MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera ClusterAbdul Manaf
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replicationPoguttuezhiniVP
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
N:1 Replication meets MHA
N:1 Replication meets MHAN:1 Replication meets MHA
N:1 Replication meets MHAdo_aki
 
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATIONEXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATIONMysql User Camp
 
Buytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemakerBuytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemakerkuchinskaya
 
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...NETWAYS
 
Download presentation
Download presentationDownload presentation
Download presentationRachit Gaur
 
Download presentation531
Download presentation531Download presentation531
Download presentation531Indra Pratap
 
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Colin Charles
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialColin Charles
 
MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016Colin Charles
 
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomMore on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomValeriy Kravchuk
 
Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015Chris Tankersley
 
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...Insight Technology, Inc.
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesNETWAYS
 
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & TroubleshootingApache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & TroubleshootingJayush Luniya
 

Similar to OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started & moving past its quirks (20)

MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
N:1 Replication meets MHA
N:1 Replication meets MHAN:1 Replication meets MHA
N:1 Replication meets MHA
 
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATIONEXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
EXPERIENCE WITH MYSQL HA SOLUTION AND GROUP REPLICATION
 
Buytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemakerBuytaert kris my_sql-pacemaker
Buytaert kris my_sql-pacemaker
 
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
 
Download presentation
Download presentationDownload presentation
Download presentation
 
Download presentation531
Download presentation531Download presentation531
Download presentation531
 
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 
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
 
MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016
 
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomMore on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
 
Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015
 
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin Charles
 
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & TroubleshootingApache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 

OSDC 2014: Colin Charles - Automated MySQL failover with MHA: getting started & moving past its quirks

  • 1. Automated MySQL failover with MHA: getting started & moving past its quirks Colin Charles,Team MariaDB, SkySQL Ab colin@mariadb.org | byte@bytebot.net http://mariadb.org/ http://bytebot.net/blog/ | @bytebot on Twitter Open Source Data Centre Conference, Berlin, Germany - 10 April 2014
  • 2. whoami • Work on MariaDB at SkySQL Ab • Merged with Monty Program Ab, makers of MariaDB • Formerly MySQL AB (exit: Sun Microsystems) • Past lives include Fedora Project (FESCO), OpenOffice.org • MHA experience • since November 2011 (MHA 0.52) • NRE work to make it run in a Solaris 10 environment... with no Internet access! • Continued deployment advice + work for data centre use • Much thanks to SkySQL for the experience
  • 3. Aims • Why MHA? • What does MHA do? • How does MHA do it? • Running MHA,VIP failover, integration, etc • Who uses MHA? • Is fully automated failover a good idea?
  • 4. Why this talk • High Performance MySQL, 3rd Edition • Published: March 16 2012
  • 5. But first... MySQL replication • Single master, multiple slave architecture • When master is unavailable, writes stop being accepted • Promoting a new master is not that easy • New master needs to wait to apply all relay log events • Slaves need to be consistent • MySQL clients need to reconnect to new master • All slaves need to start replication from proper binlog position
  • 6. Where did MHA come from? • DeNA won 2011 MySQL Community Contributor of the Year (April 2011) • MHA came in about 3Q/2011 • Written byYoshinori Matsunobu, Oracle ACE Director
  • 7. What is MHA? • MHA for MySQL: Master High Availability Manager tools for MySQL • Goal: automating master failover & slave promotion with minimal downtime • Set of Perl scripts • http://code.google.com/p/mysql-master-ha/
  • 8. Why MHA? • Automating monitoring of your replication topology for master failover • Scheduled online master switching to a different host for online maintenance • Switch back after OPTIMIZE/ALTER table, software or hardware upgrade • Schema changes without stopping services • pt-online-schema-change, oak-online-alter-table, Facebook OSC • Interactive/non-interactive master failover (just for failover, with detection of master failure +VIP takeover to Pacemaker)
  • 9. Why is master failover hard? • When master fails, no more writes till failover complete • MySQL replication is asynchronous (MHA works with async + semi-sync replication) • slave2 is latest, slave1+3 have missing events, MHA does: • copy id=10 from master if possible • apply all missing events
  • 10. Semi-sync replication • If master crashes (or is shutdown :P), MHA cannot save binlogs, latest data is lost • Minimises risk of binlog event existing only on crashed master • Guarantees at least one slave receives binlog events at commit • http://code.google.com/p/mysql-master-ha/wiki/ UseCases#Using_together_with_Semi- Synchronous_Replication
  • 11. MHA:Typical scenario • Monitor replication topology • If failure detected on master, immediately switch to a candidate master or the most current slave to become new master • MHA must fail to connect to master server three times • CHANGE MASTER for all slaves to new master • Print (stderr)/email report, stop monitoring
  • 12. So really, what does MHA do?
  • 13. Typical timeline • Usually no more than 10-30 seconds • 0-10s: Master failover detected in around 10 seconds • (optional) check connectivity via secondary network • (optional) 10-20s: 10 seconds to power off master • 10-20s: apply differential relay logs to new master • Practice: 4s @ DeNA, usually less than 30s
  • 14. How does MHA work? • Save binlog events from crashed master • Identify latest slave • Apply differential relay log to other slaves • Apply saved binlog events from master • Promote a slave to new master • Make other slaves replicate from new master
  • 15. Getting Started • MHA requires no changes to your application • You are of course to write to a virtual IP (VIP) for your master • MHA does not build replication environments for you - that’s DIY
  • 16. MHA Node • Download mha4mysql-node & install this on all machines: master, slaves, monitor • Packages (DEB, RPM) available • Manually, make sure you have DBD::mysql & ensure it knows the path of your MySQL
  • 17. What’s in MHA node • save_binary_logs - save & copy master’s binlogs • apply_diff_relay_logs - find differential relay log events & apply missing events • purge_relay_logs - purge relay log files
  • 18. MHA Manager server • Monitor server doesn’t have to be powerful at all, just remain up • This is a single-point-of-failure so monitor the manager server where MHA Manager gets installed • If MHA Manager isn’t running, your app still runs, but automated failover is now disabled
  • 19. MHA Manager • You must install mha4mysql-node then mha4mysql-manager • Manager server has many Perl dependencies: DBD::mysql, Config::Tiny, Log::Dispatch, Parallel::ForkManager, Time::HiRes • Package management fixes dependencies, else use CPAN
  • 20. Configuring MHA • Application configuration file: see samples/conf/app1.cnf • Place this in /etc/MHA/app1.cnf • Global configuration file: see /etc/MHA/ masterha_default.cnf (see samples/conf/ masterha_default.cnf)
  • 21. app1.cnf [server default] manager_workdir=/var/log/masterha/app1 manager_log=/var/log/masterha/app1/manager.log ! [server1] hostname=host1 ! [server2] hostname=host2 candidate_master=1 ! [server3] hostname=host3 ! [server4] hostname=host4 no_master=1 no need to specify master as MHA auto-detects this sets priority, but doesn’t necessarily mean it gets promoted as a default (say its too far behind replication). But maybe this is a more powerful box, or has a better setup will never be the master. RAID0 instead of RAID1+0? Slave is in another data centre?
  • 22. masterha_default.cnf [server default] user=root password=rootpass ssh_user=root master_binlog_dir= /var/lib/mysql,/var/log/mysql remote_workdir=/data/log/masterha ping_interval=3 # secondary_check_script=masterha_secondary_check -s remote_host1 -s remote_host2 # master_ip_failover_script= /script/masterha/master_ip_failover # shutdown_script= /script/masterha/power_manager # report_script= /script/masterha/send_report # master_ip_online_change_script= /script/masterha/master_ip_online_change check master activity from manager->remote_hostN- > master (multiple hosts to ensure its not a network issue) STONITH
  • 23. MHA uses SSH • MHA uses SSH actively; passphraseless login • In theory, only require Manager SSH to all nodes • However, remember masterha_secondary_check •masterha_check_ssh --conf=/ etc/MHA/app1.cnf
  • 24. Check replication •masterha_check_repl --conf=/etc/ MHA/app1.cnf • If you don’t see MySQL Replication Health is OK, MHA will fail • Common errors? Master binlog in different position, read privileges on binary/relay log not granted, using multi-master replication w/o read- only=1 set (only 1 writable master allowed)
  • 25. MHA Manager •masterha_manager --conf=/etc/ MHA/app1.cnf • Logs are printed to stderr by default, set manager_log • Recommended running with nohup, or daemontools (preferred in production) • http://code.google.com/p/mysql-master-ha/wiki/ Runnning_Background
  • 26. So, the MHA Playbook • Install MHA node, MHA manager •masterha_check_ssh --conf=/etc/ app1.cnf •masterha_check_repl --conf=/etc/ app1.cnf •masterha_manager --conf=/etc/ app1.cnf • That’s it!
  • 27. master_ip_failover_scri pt • Pacemaker can monitor & takeoverVIP if required • Can use a catalog database • map between application name + writer/reader IPs • SharedVIP is easy to implement with minimal changes to master_ip_failover itself (however, use shutdown_script to power off machine)
  • 28. master_ip_online_chan ge • Similar to master_ip_failover script, but used for online maintenance •masterha_master_switch -- master_state=alive • MHA executes FLUSH TABLES WITH READ LOCK after the writing freeze
  • 29. Test the failover •masterha_check_status -- conf=/etc/MHA/app1.cnf • Kill MySQL (kill -9, shutdown server, kernel panic) • MHA should go thru failover (stderr) • parse the log as well • Upon completion, it stops running
  • 30. masterha_master_switc h • Manual failover •--master_state=dead • Scheduled online master switchover • Great for upgrades to server, etc. •masterha_master_switch -- master_state=alive --conf=/etc/ MHA/app1.cnf -- new_master_host=host2
  • 31. HandlingVIPs my $vip = ‘192.168.0.1/24”; my $interface = “0”; my $ssh_start_vip = “sudo /sbin/ifconfig eth0:$key $vip”; my $ssh_stop_vip = “sudo /sbin/ifconfig eth0:$key down”; ... sub start_vip() { `ssh $ssh_user@$new_master_host ” $ssh_start_vip ”`; } sub stop_vip() { `ssh $ssh_user@$orig_master_host ” $ssh_stop_vip ”`; }
  • 32. Integration with other HA solutions • Pacemaker • on RHEL6, you need some HA add-on, just use the CentOS packages • /etc/ha.d/haresources to configureVIP •`masterha_master_switch -- master_state=dead --interactive=0 -- wait_on_failover_error=0 -- dead_master_host=host1 -- new_master_host=host2` • Corosync + Pacemaker works well
  • 33. Solaris • MHA tested to work on Linux and Solaris 10 & greater • Use a .pkg MySQL • Solaris 10 needs a compiler (SolarisStudio - register w/ Oracle to download) • CPAN: manual builds of dependencies • Solaris doesn’t have md5sum (call md5) • Solaris ssh isn’t OpenSSH, missing some features like ConnectionTimeout
  • 34. What about replication delay? • By default, MHA checks to see if slave is behind master. By more than 100MB, it is never a candidate master • If you have candidate_master=1 set, consider setting check_repl_delay=0 • You can integrate it with pt-heartbeat from Percona Toolkit • http://www.percona.com/doc/percona-toolkit/2.1/ pt-heartbeat.html
  • 35. MHA deployment tips • When testing, you really should install this as root • SSH needs to work across all hosts • If you don’t want plaintext passwords in config files, use init_conf_load_script • Each monitor can monitor multiple MHA pairs (hence app1, app2, etc.) • You can have a standby master, make sure its read-only • By default, master1->master2->slave3 doesn’t work • MHA manages master1->master2 without issue • Use multi_tier_slave=1 option • Make sure replication user exists on candidate master too!
  • 36. Alternate solutions • Heartbeat + DRBD • Costs $$$ -> passive master • innodb_flush_log_at_trx_commit=1, sync_binlog=1 is expensive in MySQL • http://www.mysqlperformanceblog.com/ 2008/06/02/how-much-overhead-drdb-could-cause/ • MariaDB 5.3/5.5 or Percona Server 5.5 or MySQL 5.6 mitigate this by having group commit in the binary log
  • 37. Alternate solutions II • MySQL NDB Cluster • Galera Cluster • MariaDB Galera Cluster, Percona XtraDB Cluster • Percona Replication Manager (PRM) • https://raw.github.com/y-trudeau/resource- agents-prm/master/heartbeat/mysql • Tungsten Replicator
  • 38. mysqlfailover • mysqlfailover from mysql-utilities using GTID’s in 5.6 • target topology: 1 master, n-slaves • enable: log-slave-updates, report-host, report-port, master- info-table=TABLE • modes: elect (choose candidate from list), auto (default), fail • --discover-slaves-login for topology discovery • monitoring node: SPoF • Errant transactions prevent failover! • Restart node? Rejoins replication topology, as a slave.
  • 39. MariaDB 10 • New slave: SET GLOBAL GTID_SLAVE_POS = BINLOG_GTID_POS("masterbin.00024", 1600); CHANGE MASTER TO master_host="10.2.3.4", master_use_gtid=slave_pos; START SLAVE; • use GTID: STOP SLAVE
 CHANGE MASTER TO master_use_gtid=current_pos; START SLAVE; • Change master: STOP SLAVE
 CHANGE MASTER TO master_host="10.2.3.5"; START SLAVE;
  • 40. Where is MHA used • DeNA • Premaccess (Swiss HA hosting company) • Ireland’s national TV & radio service • Jetair Belgium (MHA + MariaDB!) • Samsung • SK Group • DAPA • Facebook
  • 41. MHA 0.56 is out now! • MHA 0.56 released April 1 2014 (0.55: December 12 2012) • http://code.google.com/p/mysql-master-ha/ wiki/ReleaseNotes
  • 42. MHA 0.56 • 5.6 GTID: GTID + auto position enabled? Failover with GTID SQL syntax not relay log failover • MariaDB 10 needs work • MySQL 5.6 support for checksum in binlog events + multi-threaded slaves • mysqlbinlog and mysql in custom locations (configurable clients) • binlog streaming server supported
  • 43. MHA 0.56 • ping_type = INSERT (for master connectivity checks - assuming master isn’t accepting writes) • future • Ship MHA resource agent - http:// www.skysql.com/downloads/mha-master- high-availability • MariaDB 10 gtid handling
  • 44. Is fully automated failover a good idea? • False alarms • Can cause short downtime, restarting all write connections • Repeated failover • Problem not fixed? Master overloaded? • MHA ensures a failover doesn’t happen within 8h, unless -- last_failover_minute=n is set • Data loss • id=103 is latest, relay logs are at id=101, loss • group commit means sync_binlog=1, innodb_flush_log_at_trx_commit=1 can be enabled! (just wait for master to recover) • Split brain • sometimes poweroff takes a long time
  • 45. Support • SkySQL: www.skysql.com • Percona: www.percona.com • PalominoDB: www.palominodb.com • AccelerationDB: www.accelerationdb.com
  • 46. Automated tools to play with • 4-hostVagrant setup for MySQL MHA • https://github.com/hholzgra/vagrant-mysql-mha • Palomino Cluster Tool • https://github.com/time-palominodb/ PalominoClusterTool • Ansible playbooks for MHA • 4-hostVagrant setup for MHA • https://github.com/lefred/vagrant-mha
  • 47. Video resources • Yoshinori Matsunobu talking about High Availability & MHA at Oracle MySQL day • http://www.youtube.com/watch? v=CNCALAw3VpU • Alex Alexander (AccelerationDB) talks about MHA, with an example of failover, and how it compares to Tungsten • http://www.youtube.com/watch? v=M9vVZ7jWTgw
  • 48. References • Design document • http://www.slideshare.net/matsunobu/automated-master- failover • Configuration parameters • http://code.google.com/p/mysql-master-ha/wiki/Parameters • JetAir MHA use case • http://www.percona.com/live/mysql-conference-2012/sessions/ case-study-jetair-dramatically-increasing-uptime-mha • MySQL binary log • http://dev.mysql.com/doc/internals/en/binary-log.html
  • 49. Q&A colin@mariadb.org | byte@bytebot.net http://skysql.com/ | http://mariadb.org/ twitter: @bytebot | url: http://bytebot.net/blog/