mysql fabric: high availability using python/connector
TRANSCRIPT
MYSQL-Fabric: High Availability using Connector/Python
Vishal YadavNEC Technologies India Pvt. Ltd.
• Python and OpenStack Evangelist @ NEC Technologies• Other Talks and Submissions
OpenStack India Meetup, New Delhi 2015 Rally: OpenStack Benchmarking (
http://www.slideshare.net/vishalcdac/rally-openstackbenchmarking)
Python FOSDEM-2015 and PyCON India 2014 Python Taskflow https://
speakerdeck.com/vishalcdac07/python-statemanagement-taskflow
• Contact Me: G-Mail: [email protected] Twitter: @vishalcdac07
2
Agenda
• MySQL-Fabric: Why? (Motivation)• MySQL-Fabric: What? (Hello!!)• Installation and Setup• High Availability• Conclusion
3
MySQL Fabric (Motivation)
4
Building Reliable Systems
• High Availability is an integral part of designing a reliable system
• Reason for system downtime System Failure
Hardware faults Software bugs
Disasters Maintenance User errors
• High Availability Concept Monitoring Redundancy Activate replacement Distribute load
5
High-availability Solutions for MySQL
• DRBD and other active/passive, shared storage solution
• Standard Master-Slave Replication
• MySQL Cluster
• Galera / Percona Cluster
6
Problem of These HA Solutions
• Passive nodes are waste of resources
• Some of them are not shared-nothing
• No integrated sharding (write-scaling)
• Complex to setup and administer
• Require application re-writes
7
MySQL Fabric (What?)
8
9
• MySQL Fabric is an extensible framework for managing farms of MySQL Servers
• Provides 2 primary features: High Availability (HA) Scaling out (Sharding)
• These features can be used in isolation or in combination• Provides server provisioning using cloud frameworks such
as OpenStack
MySQL Fabric HA Implementation
10
11
Availability Group
MySQL Fabric: Extensible Architecture
12
Installation and Setup
13
Installation
14
• MySQL Servers• Requires MySQL 5.6• For Ubuntu > 14.04
#apt-get install mysql-client-core-5.6 mysql-server-5.6• For other distribution use mysql community repo:
http://dev.mysql.com/downloads/repo/ #yum install mysql-community-server
• Python Connector• http://dev.mysql.com/downloads/connector/python/
• MySQL Fabric• Part of MySQL utilities• http://dev.mysql.com/downloads/utilities/
Setup
/etc/mysql/fabric.cfg
15
Setup (Cont…)
/etc/mysql/fabric.cfg
16
Example Read Only Code
17
Result
18
Conclusion
19
20