managed mysql service

Post on 12-Feb-2017

123 Views

Category:

Engineering

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Managed MySQL Servicewsickles@underarmour.com

Managed MySQL Service

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

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

Managed MySQL Service

Build Our Own• Back-end persistent Relational data store• High Availability• Scalable• In House 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

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

Managed MySQL Service

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

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

Managed MySQL Service

Managed MySQL Service

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

Managed MySQL Service

Failover• AWS ELB -> HAProxy -> Percona XtraDB

Cluster• Lose a node: HAProxy, Percona XtraDB

Cluster, ELB• Lose an Availability Zone• Region?

Managed MySQL Service

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

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

Managed MySQL Service

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

Managed MySQL Service

Questions?wsickles@underarmour.com

top related