Openstack for MySQL DBA's - Percona · MySQL for Openstack : planning Query load • If Acid,...
Transcript of Openstack for MySQL DBA's - Percona · MySQL for Openstack : planning Query load • If Acid,...
Openstack for MySQL DBA's
Yves TrudeauSeptember 2014
Agenda
Part 1: MySQL for Openstack
• Planning• HA
Part 2: Openstack for MySQL
• Options• Performance• HA
2
MySQL for Openstack
3
MySQL for Openstack : planning
Query load
• If Acid, commit #1, many empty commits
• Careful with keystone tokens if in database
– cron keystone-manage token_flush
• Updates to services/agents tables are frequent
4
MySQL for Openstack : planning
Query load (cont.)
• Simplest cluster, ~7 QPS, small one ~15 QPS
• Many subqueries, best handled by 5.6.x
• Some poor queries (working on it)
• Some missing keys (working on it)
5
MySQL for Openstack : planning
Database size
• The Openstack dataset is tiny
• Openstack deletes very few rows → cleanup
• You need a big cluster for 1GB+ data set.
6
MySQL for Openstack : planning
Multiple data centers
• Really only keystone and maybe glance matters
• If you replicate glance, you need to replicate images
7
MySQL for Openstack : HA solutions
PXC/Galera
• Preferred solution
• Needs HAProxy to connect to a good node
• Should ideally use one a at time
• Needs 3 nodes, 1 can be a garbd
8
MySQL for Openstack : HA solutions
NDB
• I know... it is complex
• The fit is quite good, many small queries, tiny dataset
• All SQL nodes active, still need HAProxy or similar
9
MySQL for Openstack : HA solutions
Pacemaker/PRM
• Replication based, some updates could be lost after failover
• One active MySQL master, accessed through a VIP
• After failover, MySQL is warm
• 3 Pacemaker nodes (1 can be standby)
11
MySQL for Openstack : HA solutions
Multiple data centers, geo-DR
• Large Openstack cluster with PXC/Galera over WAN = commit latency
• Mixed solution, PXC local with replication (PRM) for wan would be best (*working on it)
12
MySQL for Openstack : Summary
● Dataset size and load are moderate● PXC/Galera preferred scaling/HA● Multi-site → async replication OK
13
Openstack for MySQL
14
Openstack for MySQL : options
Standalone/replication
• Obviously works...
• Suggest using fixed IP with a neutron port
15
Openstack for MySQL : options
PXC/Galera
• Works also well
• Again, fixed IPs make setup easier
• No multicast
• Need a way to load balance to valid nodes
16
Openstack for MySQL : options
PXC/Galera (cont.)
• If Cinder backend supports snapshot → new super fast SST method!
17
Openstack for MySQL : options
NDB
• Works also well
• Again, fixed IPs make setup easier
• If SQL nodes are cohosted with the application nodes, no need to load balance
18
Openstack for MySQL : options
Trove
• Interesting but new
• Setup is not an easy ride
• Only supports replication for now
• Galera support coming → Percona working on it
19
Openstack for MySQL : Performance
Cinder backends
• LVM/iSCSI, SAN → You get what you have
• NFS → Not a big fan for MySQL
• GlusterFS → User space fuse driver :(
• Ceph → Complex but interesting + snapshots
20
Openstack for MySQL : HA
MySQL HA considerations in Openstack
• No VIPs, a least not easily → spoofing prev.
• Floating IPs...
• HAProxy
• Pacemaker/Corosync udpu → iptables DNAT
21
Openstack for MySQL : HA
MySQL HA considerations in Openstack (cont.)
• If cinder supports easy snapshots → custom SST for PXC
• Think about availability zone → per rack?
22
Openstack for MySQL : Summary
• Well known solutions work
• Trove is promising
• Backend choice is very important
• Fixed IPs with Neutron port ease the pain
23
Questions?
24