managed mysql service

15
Managed MySQL Service [email protected]

Upload: bill-sickles

Post on 12-Feb-2017

129 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Managed MySQL Service

Managed MySQL [email protected]

Page 2: Managed MySQL Service

Managed MySQL Service

Relational Data Store for Services• Fully Managed• Simple to Deploy• Easy to Scale• Reliable

Page 3: Managed MySQL Service

Managed MySQL Service

Sounds like Amazon RDS: Why build our own?• Fails over quite often• Provisioning:

• Instance Size, Storage, PIOPs, Parameter Groups

• Limited to MySQL v5.1, v5.5, and v5.6• Performance Metrics• Replication• Migrations/Upgrades• Amazon Service

Page 4: Managed MySQL Service

Managed MySQL Service

Build Our Own• Back-end persistent Relational data store• High Availability• Scalable• In House Service

Page 5: Managed MySQL Service

Managed MySQL Service

Relational Database Management System (RDBMS)• Percona MySQL

• Experience• Master-Master with Slaves• Uptime

• Percona XtraDB Cluster• Synchronous Replication• Multi-Master with Slaves

Page 6: Managed MySQL Service

Managed MySQL Service

HAProxy• One port for Writes

• Pointed to a single node• Fail over to another single node

• One port for Reads• Pointed to multiple nodes• Fail over to available nodes

• Xinetd checks for available MySQL nodes

Page 7: Managed MySQL Service

Managed MySQL Service

AWS Elastic Load Balancer• Multiple Availability Zones• Cross zone load balancing enabled• HTTP health check on HAProxy servers• AWS Service

Page 8: Managed MySQL Service

Managed MySQL Service

Page 9: Managed MySQL Service

Managed MySQL Service

How does it work?• A database is created in the cluster• Users are created for each database

• DDL user for Drop/Create objects• DML user for Insert/Update/Delete• RO user for read-only queries

• A single node is designated as the “writer” for each database

• All other nodes are designated as “readers” for each writer database

Page 10: Managed MySQL Service

Managed MySQL Service

Page 11: Managed MySQL Service

Managed MySQL Service

Backup/Restore• Backup Server• Nightly Backups• MySQL Binlogs• Snapshots

Page 12: Managed MySQL Service

Managed MySQL Service

Failover• AWS ELB -> HAProxy -> Percona XtraDB

Cluster• Lose a node: HAProxy, Percona XtraDB

Cluster, ELB• Lose an Availability Zone• Region?

Page 13: Managed MySQL Service

Managed MySQL Service

Monitoring• Python Diamond• Librato/PagerDuty• Mysql-proxy

• Small percentage of all traffic• Full query logging• Pushed to ELK

Page 14: Managed MySQL Service

Managed MySQL Service

Relational Data Store for Services• Fully Managed• Simple to Deploy• Easy to Scale• Reliable

Page 15: Managed MySQL Service

Managed MySQL Service

[email protected]