mysql fabric: high availability using python/connector
TRANSCRIPT
![Page 1: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/1.jpg)
MYSQL-Fabric: High Availability using Connector/Python
Vishal YadavNEC Technologies India Pvt. Ltd.
![Page 2: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/2.jpg)
• 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
![Page 3: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/3.jpg)
Agenda
• MySQL-Fabric: Why? (Motivation)• MySQL-Fabric: What? (Hello!!)• Installation and Setup• High Availability• Conclusion
3
![Page 4: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/4.jpg)
MySQL Fabric (Motivation)
4
![Page 5: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/5.jpg)
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
![Page 6: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/6.jpg)
High-availability Solutions for MySQL
• DRBD and other active/passive, shared storage solution
• Standard Master-Slave Replication
• MySQL Cluster
• Galera / Percona Cluster
6
![Page 7: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/7.jpg)
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
![Page 8: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/8.jpg)
MySQL Fabric (What?)
8
![Page 9: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/9.jpg)
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
![Page 10: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/10.jpg)
MySQL Fabric HA Implementation
10
![Page 11: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/11.jpg)
11
Availability Group
![Page 12: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/12.jpg)
MySQL Fabric: Extensible Architecture
12
![Page 13: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/13.jpg)
Installation and Setup
13
![Page 14: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/14.jpg)
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/
![Page 15: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/15.jpg)
Setup
/etc/mysql/fabric.cfg
15
![Page 16: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/16.jpg)
Setup (Cont…)
/etc/mysql/fabric.cfg
16
![Page 17: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/17.jpg)
Example Read Only Code
17
![Page 18: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/18.jpg)
Result
18
![Page 19: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/19.jpg)
Conclusion
19
![Page 20: MySQL Fabric: High Availability using Python/Connector](https://reader035.vdocument.in/reader035/viewer/2022062412/58a4e7e51a28abd8548b4d6b/html5/thumbnails/20.jpg)
20