230 likes | 382 Views
MySQL in the Cloud – Endless Possibilities. Grant McAlister, Senior Principal Engineer. What is the CLOUD? . Cloud computing is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand, like a public utility. - Wikipedia.
E N D
MySQL in the Cloud – Endless Possibilities Grant McAlister, Senior Principal Engineer
What is the CLOUD? • Cloud computing is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand, like a public utility. - Wikipedia
What is MySQL in the Cloud? • Build your own • AWS – EC2, EBS & S3 • Rackspace – CloudServers & CloudFiles • Relational Database Services • AWS RDS • FathomDB
Breaking apart scaling CPU CPU MEM Storage IOPS Storage IOPS
Storage is CHEAP!!!! • Drive capacity is doubling every 18-24 months for the same price • IOPS are not CHEAP and are not getting much cheaper • You can now split IOPS from storage to reduce costs
Usable Backups • Tape Sucks! • Slow and error prone • Humans are involved • Cloud Storage • Disk based backups • Incremental backups – save time and money • Recoveries that work!!!!
Location, Location, Location • Multiple locations across the world • Reduce latency to customer • Locations can have multiple datacenters • Increase durability and availability
Database Lifetimes • OLD • Typically measured in years • Almost never kill off a database • NEW • Measured in hours or minutes • Application based creation and deletion of db
Rapid Creation and Deletion • Standard DB Instance creation • Get a new host – weeks to months • Get the host setup with OS and software – hours to days • Setup db instance, monitoring and backups – hours to days • Cloud DB Instance creation • From API calls to running DB instance – 5 to 10 minutes • Demo deleting and creating 10 DB Instances
Cloud DB Service Capabilities • Automated Backups • Patching • Monitoring & Recovery of DB Instance and Hosts • Replication / HA
What are Endless Possibilities • New methods of using databases • Allow us to build applications that would have been difficult or impossible to do. • Scaling up or down based on workload • Large number of partitions or shards • A hierarchical storage database system • Testing
On demand daily scaling 25% Savings
On Demand Yearly Scaling 50% Savings
Vertical Partitioning Before After Very Large CPU Very Large CPU Very Large CPU Large CPU Customers Orders Customers Orders Catalog Addresses Order Items Addresses Order Items Catalog
Sharding Horizontally • After • Hashed by CustomerID Before Very Large CPU Very Large CPU Very Large CPU Very Large CPU Very Large CPU Customers Customers Customers Customers Customers Addresses Addresses Addresses Addresses Addresses Orders Orders Orders Orders Orders Order Items Order Items Order Items Order Items Order Items
Initial Partitioning & Re-Sharding • Cloud Service Provides • Provisioning and management of large numbers of instances • Backup/Restore to facilitate making new partitions • Allows you to both scale up and scale out • Should only have to scale for CPU/MEM
Database over time Extra Large Server Very Large Server Large Server Small Server Storage Storage Storage Storage
HSM DB System Give me Week1 data Application Layer Small Small Small Small Large CPU Large CPU Week 1 Week 1 Week 2 Week 1 Week 3 Week 2 Week 3 Week4 Week 2 Week 1 Week 4 Week 5 Week 3 Week 2 Week 1 Week 5 Week 3 Week 2 Week 6 Week 1 Week 4 Writes Reads
Typical Testing Setup PROD TEST Very Large Server Large Server Weekly Refresh Storage Storage
Cloud Testing Setup 7 AM 6 PM PROD Bob Test Ted Test Mary Test Very Large Server Very Small Server Very Small Server Very Small Server Storage Storage Storage Storage
Demo Testing 10 different configurations Test Driver Test Driver Test Driver Test Driver Test Driver Test Driver Test Driver Test Driver Test Driver Test Driver Instance TPCC-0 innodb_thread_concurrency=0 Instance TPCC-1 innodb_thread_concurrency=1 Instance TPCC-2 innodb_thread_concurrency=2 Instance TPCC-3 innodb_thread_concurrency=3 Instance TPCC-4 innodb_thread_concurrency=4 Instance TPCC-5 innodb_thread_concurrency=5 Instance TPCC-6 innodb_thread_concurrency=6 Instance TPCC-7 innodb_thread_concurrency=7 Instance TPCC-8 innodb_thread_concurrency=8 Instance TPCC-9 innodb_thread_concurrency=9
Conclusions • The Cloud provides very powerful features • The new features can enable new use cases • Still very early in cloud computing for databases • Just scratching the surface
grant@amazon.com Thank You