SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
MySQL in the Cloud
Colin Charles, MariaDB/SkySQL Ab
colin@mariadb.org | byte@bytebot.net
http://mariadb.com/ | http://mariadb.org/
http://bytebot.net/blog/ | @bytebot on Twitter
LinuxCon/CloudOpen, New Orleans, Louisiana, USA
17 September 2013
1
whoami
• Chief Evangelist, MariaDB at Monty Program
SkySQL
• Formerly MySQL AB/Sun Microsystems
• Using/developing/hacking on MySQL since
2000
• Previously on FESCO for The Fedora
Project, and worked on OpenOffice.org
(2000-2005)
2
Agenda
• MySQL as a service offering (DBaaS)
• Choices
• Considerations
• MySQL versions & access
• Costs
• Deeper into RDS
• Should you run this on EC2 or an equivalent?
• Conclusion
3
MySQL as a service
• Database as a Service (DBaaS)
• MySQL available on-demand, without any
installation/configuration of hardware/
software
• Pay-per-usage based
• Provider maintains MySQL, you don’t
maintain, upgrade, or administer the database
4
New way of
deployment
• Enter a credit card
number
• call API (or use the GUI)
ec2-run-instances ami-
xxx -k ${EC2_KEYPAIR} -t
m1.large
nova boot --image
centos6-x86_64 --flavor
m1.large db1
5
credit: http://www.flickr.com/photos/68751915@N05/6280507539/
Why DBaaS?
• “Couldn’t we just have a few more servers
to handle the traffic spike during the
elections?”
• Don’t have a lot of DBAs, optimise for
operational ease
• Rapid deployment & scale-out
6
Your choices today
• Amazon Web Services Relational Database
Service (RDS)
• Rackspace Cloud Databases
• Google Cloud SQL
• HP Cloud Relational Database
7
There are more
• Jelastic - PaaS offering MySQL, MariaDB
• ClearDB - MySQL partnered with heroku,
appfog,Azure clouds
• Joyent - Image offers Percona MySQL
• Xeround - 2 weeks notice...
8
Whom we won’t be
covering
• GenieDB - globally distributed MySQL as a
service, master-master replication, works
on EC2, Rackspace, Google Compute
Engine, HP Cloud
• ScaleDB - promises write scaling, HA
clustering, etc. replacing InnoDB/MyISAM
9
Regions & Availability
Zones
• Region: a data centre
location, containing
multiple Availability
Zones
• Availability Zone (AZ):
isolated from failures
from other AZs + low-
latency network
connectivity to other
zones in same region
10
Location, location,
location
• AWS RDS: US East (N.Virginia), US West
(Oregon), US West (California), EU (Ireland),
APAC (Singapore),APAC (Tokyo),APAC
(Sydney), South America (São Paulo), GovCloud
• Rackspace: USA (Dallas DFW, Chicago ORD,
N.Virginia IAD),APAC (Sydney), EU (London)*
• Google Cloud SQL: US, EU
• HP Cloud: US-East (Virginia), US-West
11
Service Level
Agreements (SLA)
• AWS - 99.95% in a calendar month
• Rackspace - 99.9% in a calendar month
• Google - 99.95% in a calendar month
• HP Cloud - no SLA yet, services in beta
• SLAs exclude “scheduled maintenance”
• AWS is 30 minutes/week, so really 99.65%
12
Support
• AWS - forums; $49/mo gets email; $100+
phone #
• Rackspace - live chat, phone #, forums
• Google - forums; $150/mo gets support
portal; $400+ for phone #
• HP Cloud - phone #, chat, customer forum
13
Who manages this?
• AWS: self-management, Enterprise ($15k+)
• Rackspace: $100 + 0.04 cents/hr over
regular pricing
• Google: self-management
• HP Cloud: self-management
14
MySQL versions
• AWS: MySQL Community 5.1.71, 5.5.33,
5.6.13
• Rackspace: MySQL Community 5.1
• Google: MySQL Community 5.5
• HP Cloud: Percona Server 5.5.28
15
Access methods
• AWS - within Amazon, externally via mysql
client,API access.
• Rackspace - private hostname within Rackspace
network, standard mysql client,API access.
• Google - within AppEngine, or a command line
Java tool (gcutil)
• HP Cloud - within HP Cloud, externally via
client (trove-cli, reddwarf) or API access.
16
Can you configure
MySQL?
• You don’t access my.cnf
naturally
• In AWS you have
parameter groups which
allow configuration of
MySQL
17
source: http://www.mysqlperformanceblog.com/2013/08/21/amazon-rds-with-mysql-5-6-configuration-variables/
Cost
• Subscribe to relevant newsletters of your
services
• Cost changes rapidly, plus you get new instance
types and new features (IOPS)
• Don’t forget network access costs
• Monitor your costs daily, hourly if possible
(EC2 instances can have spot pricing)
• https://github.com/ronaldbradford/aws
18
Costs:AWS
• AWS prices vary between regions
• http://aws.amazon.com/rds/pricing/
19
Costs:AWS II
• Medium instances (3.75GB) useful for testing
($2,411/yr)
• Large instance (7.5GB) production ready ($4,777/
yr)
• XL instance (15GB, 8ECUs) ($9,555/yr)
• m2.2XL instance (34GB, 13ECUs, 500Mbps PIOPS)
($16,568/yr)
• m2.4XL instance (68GB, 26ECUs, 1000Mbps PIOPS)
($33,048/yr)
20
Costs: Rackspace
• Option to have regular Cloud Database or
Managed Instances
• 4GB instance (testing) is $3,504/yr
• 8GB instance (production) is $6,658/yr
• Consider looking at I/O priority, and the
actual TPS you get
21
Costs: Google
• You must enable billing before you create Cloud
SQL instances
• https://developers.google.com/cloud-sql/docs/billing
• Testing (D8 - 4GB RAM) - ($4,274.15)
• XL equivalent for production (D16 - 8GB RAM) -
($8,548.30)
• Packages billing plans are cheaper than per-use
billing plans
22
Costs: HP Cloud
• Its currently in beta
• Its free...
23
Where do you host
your application?
• Typically within the compute clusters of the
service you’re running the DBaaS in
• This also means your language choices are
limited based on what the platform offers
(eg.AppEngine only recently started
offering PHP)
24
RDS: Multi-AZ
• Provides enhanced durability (synchronous
data replication)
• Increased availability (automatic failover)
• Warning: can be slow (1-10 mins+)
• Easy GUI administration
• Doesn’t give you another usable “read-
replica” though
25
External replication
• MySQL 5.6 you can do RDS -> Non-RDS
• enable backup retention, you now have
binlog access
• You still can’t replicate INTO RDS
• use Tungsten Replicator
• also supports going from RDS to
Rackspace/etc.
26
MySQL 5.6, MariaDB
10
• MySQL 5.6 in RDS provides crash-safe slaves, the
InnoDB memcached interface, online schema
changes, full-text InnoDB indexes, optimizer
improvements, INFORMATION_SCHEMA
enhancements, scalability/replication
improvements, PERFORMANCE_SCHEMA
enhancements
• MariaDB 10 has that, plus multi-source
replication, GTIDs that don’t require full restarts,
threadpool, audit plugin and more
27
Getting started
• Importing data into the cloud?
• RDS: mysqldump is a good choice
• Google Cloud SQL is only via existing
Google Cloud Storage
• Upgrading from RDS 5.5 to RDS 5.6?
• mysqldump!
28
Handling backups
• You don’t get to use xtrabackup!
• Google Cloud SQL automates backups (has
a backup window)
• Amazon has automated backups (with
point-in-time recovery), with full daily
snapshots (has a backup window).
29
Monitoring
• Options are limited,AWS has the best
options currently available
• Today you have CloudWatch
• Google has basic read/write graphs
30
Storage Engines
• MySQL (/MariaDB) has many
• cool ones include TokuDB, SPIDER,
CONNECT, CassandraSE
• You basically use InnoDB and MyISAM with
cloud solutions
• MyISAM on RDS won’t guarantee point-
in-time recovery, snapshot restore
31
High Availability
• Plan for node failures
• Don’t assume node provisioning is quick
• Backup, backup, backup!
• “Bad” nodes exist
• HA is not equal across options - RDS wins
so far
32
Unsupported features
• AWS: GTIDs, InnoDB Cache Warming,
InnoDB transportable tablespaces,
authentication plugins, semi-sync replication
• Google: UDFs, replication, LOAD DATA
INFILE, INSTALL PLUGIN, SELECT ... INTO
OUTFILE
33
Provisioned IOPS
• Only available on Amazon
• Faster, predictable, consistent I/O
performance with low latencies
• Good throughput, RAID on backed
• EBS is more reliable
34
More on RDS
• log access via API
• no SUPER access to skip replication errors
easily
• sync_binlog=0 not available
• no OS access (sar, ps, swap?, tcpdump)
• https://github.com/boto/boto
35
Warning: automatic
upgrades
• Regressions happen even with a minor
version upgrade in the MySQL world
• InnoDB update that modifies rows PK
triggers recursive behaviour until all disk
space is exceeded? 5.5.24->5.5.25 (fixed:
5.5.25a)
• Using query cache for partitioned tables?
Disabled since 5.5.22->5.5.23!
36
Benchmarking for use
• sysbench
• OLTP test, use tables with 20M rows and 20M
transactions, check 1-128 threads/run (run this
on RDS, Rackspace)
• June 2013, tps, performance per dollar, Rackspace
delivers more performance across all flavours
except 512MB instance
• Yahoo! Cloud Serving Benchmark
• https://github.com/brianfrankcooper/YCSB
37
Roadmaps?
• There don’t seem to be public roadmaps.
You find out when there’s a change!
• Expect more to move to MySQL 5.6
• except Google, who will probably move
to MariaDB 10.0
• maybe Rackspace is up in the air?
38
Running MySQL in EC2
• Can do multiple geographic
regions via replication
• Run just one Percona Server/
MariaDB server/instance
• Use additional EBS volumes for
InnoDB tablespaces
• RAID EBS volumes (RAID1)
• Warm up data partitions, mount
partitions with noatime,
nodirtime
• Vertical scaling with SSD-backed
storage
• Monitoring with nagios
• Snapshot backups and save to S3
• Can use Elastic Load Balancer
• Can use spot instances
• Can use tools like MHA to
provide automatic failover
• Can use MariaDB Galera Cluster/
Percona XtraDB Cluster
39
Some closing thoughts
• Hardware varies per region
• Sometimes, software manageability varies
per region
• Beware cost on your credit card!
40
Q&A.ThankYou.
colin@mariadb.org | byte@bytebot.net
http://bytebot.net/blog/ | @bytebot on Twitter
Download MariaDB and give it a try: http://mariadb.org/
41

Weitere ähnliche Inhalte

Was ist angesagt?

Getting to 1.5M Ads/sec: How DataXu manages Big Data
Getting to 1.5M Ads/sec: How DataXu manages Big DataGetting to 1.5M Ads/sec: How DataXu manages Big Data
Getting to 1.5M Ads/sec: How DataXu manages Big Data
Qubole
 

Was ist angesagt? (20)

Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
 
Kubernetes: Reducing Infrastructure Cost & Complexity
Kubernetes: Reducing Infrastructure Cost & ComplexityKubernetes: Reducing Infrastructure Cost & Complexity
Kubernetes: Reducing Infrastructure Cost & Complexity
 
Surge 2013: Maximizing Scalability, Resiliency, and Engineering Velocity in t...
Surge 2013: Maximizing Scalability, Resiliency, and Engineering Velocity in t...Surge 2013: Maximizing Scalability, Resiliency, and Engineering Velocity in t...
Surge 2013: Maximizing Scalability, Resiliency, and Engineering Velocity in t...
 
Cloud Price Comparison - AWS vs Azure vs Google
Cloud Price Comparison - AWS vs Azure vs GoogleCloud Price Comparison - AWS vs Azure vs Google
Cloud Price Comparison - AWS vs Azure vs Google
 
Keynote AWS Summit 2013 Sao Paulo
Keynote AWS Summit 2013 Sao PauloKeynote AWS Summit 2013 Sao Paulo
Keynote AWS Summit 2013 Sao Paulo
 
Aws Summit Berlin 2013 - Understanding database options on AWS
Aws Summit Berlin 2013 - Understanding database options on AWSAws Summit Berlin 2013 - Understanding database options on AWS
Aws Summit Berlin 2013 - Understanding database options on AWS
 
Real-Time Event Processing
Real-Time Event ProcessingReal-Time Event Processing
Real-Time Event Processing
 
Getting to 1.5M Ads/sec: How DataXu manages Big Data
Getting to 1.5M Ads/sec: How DataXu manages Big DataGetting to 1.5M Ads/sec: How DataXu manages Big Data
Getting to 1.5M Ads/sec: How DataXu manages Big Data
 
(BDT201) Big Data and HPC State of the Union | AWS re:Invent 2014
(BDT201) Big Data and HPC State of the Union | AWS re:Invent 2014(BDT201) Big Data and HPC State of the Union | AWS re:Invent 2014
(BDT201) Big Data and HPC State of the Union | AWS re:Invent 2014
 
9 Ways to Reduce Cloud Storage Costs
9 Ways to Reduce Cloud Storage Costs9 Ways to Reduce Cloud Storage Costs
9 Ways to Reduce Cloud Storage Costs
 
AWS Webcast - Amazon Kinesis and Apache Storm
AWS Webcast - Amazon Kinesis and Apache StormAWS Webcast - Amazon Kinesis and Apache Storm
AWS Webcast - Amazon Kinesis and Apache Storm
 
Intro to High Performance Computing in the AWS Cloud
Intro to High Performance Computing in the AWS CloudIntro to High Performance Computing in the AWS Cloud
Intro to High Performance Computing in the AWS Cloud
 
Hive + Amazon EMR + S3 = Elastic big data SQL analytics processing in the cloud
Hive + Amazon EMR + S3 = Elastic big data SQL analytics processing in the cloudHive + Amazon EMR + S3 = Elastic big data SQL analytics processing in the cloud
Hive + Amazon EMR + S3 = Elastic big data SQL analytics processing in the cloud
 
goto; London: Keeping your Cloud Footprint in Check
goto; London: Keeping your Cloud Footprint in Checkgoto; London: Keeping your Cloud Footprint in Check
goto; London: Keeping your Cloud Footprint in Check
 
Managing Your Cloud Spend With PlanForCloud - RightScale Compute 2013
Managing Your Cloud Spend With PlanForCloud - RightScale Compute 2013Managing Your Cloud Spend With PlanForCloud - RightScale Compute 2013
Managing Your Cloud Spend With PlanForCloud - RightScale Compute 2013
 
Google’s Committed Use Discounts vs. AWS Reserved Instances and More Ways to ...
Google’s Committed Use Discounts vs. AWS Reserved Instances and More Ways to ...Google’s Committed Use Discounts vs. AWS Reserved Instances and More Ways to ...
Google’s Committed Use Discounts vs. AWS Reserved Instances and More Ways to ...
 
Cloud Storage Comparison: AWS vs Azure vs Google vs IBM
Cloud Storage Comparison: AWS vs Azure vs Google vs IBMCloud Storage Comparison: AWS vs Azure vs Google vs IBM
Cloud Storage Comparison: AWS vs Azure vs Google vs IBM
 
Workload-Aware: Auto-Scaling A new paradigm for Big Data Workloads
Workload-Aware: Auto-Scaling A new paradigm for Big Data WorkloadsWorkload-Aware: Auto-Scaling A new paradigm for Big Data Workloads
Workload-Aware: Auto-Scaling A new paradigm for Big Data Workloads
 
Amazon Kinesis
Amazon KinesisAmazon Kinesis
Amazon Kinesis
 
Next Generation Cloud Computing With Google - RightScale Compute 2013
Next Generation Cloud Computing With Google - RightScale Compute 2013Next Generation Cloud Computing With Google - RightScale Compute 2013
Next Generation Cloud Computing With Google - RightScale Compute 2013
 

Andere mochten auch

Andere mochten auch (16)

Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud
 
Cool MariaDB Plugins
Cool MariaDB Plugins Cool MariaDB Plugins
Cool MariaDB Plugins
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 
MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016
 
Lessons from database failures
Lessons from database failures Lessons from database failures
Lessons from database failures
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server data
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
 
The Complete MariaDB Server tutorial
The Complete MariaDB Server tutorialThe Complete MariaDB Server tutorial
The Complete MariaDB Server tutorial
 
MariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQLMariaDB Server Compatibility with MySQL
MariaDB Server Compatibility with MySQL
 
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7
 
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
 
The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 
Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?
 

Ähnlich wie MySQL in the Cloud

Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Continuent
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Continuent
 
MariaDB 10 and what's new with the project
MariaDB 10 and what's new with the projectMariaDB 10 and what's new with the project
MariaDB 10 and what's new with the project
Colin Charles
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Continuent
 

Ähnlich wie MySQL in the Cloud (20)

MySQL in the Hosted Cloud
MySQL in the Hosted CloudMySQL in the Hosted Cloud
MySQL in the Hosted Cloud
 
MySQL in the Hosted Cloud - Percona Live 2015
MySQL in the Hosted Cloud - Percona Live 2015MySQL in the Hosted Cloud - Percona Live 2015
MySQL in the Hosted Cloud - Percona Live 2015
 
Databases in the hosted cloud
Databases in the hosted cloud Databases in the hosted cloud
Databases in the hosted cloud
 
Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud
 
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit
 
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
 
MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014MariaDB - a MySQL Replacement #SELF2014
MariaDB - a MySQL Replacement #SELF2014
 
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
Scylla Summit 2022: How ScyllaDB Powers This Next Tech CycleScylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQLWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #4: MS Azure Database MySQL
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
 
Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么Mariadb10 和新项目中有什么
Mariadb10 和新项目中有什么
 
MariaDB 10 and what's new with the project
MariaDB 10 and what's new with the projectMariaDB 10 and what's new with the project
MariaDB 10 and what's new with the project
 
Grails in the Cloud (2013)
Grails in the Cloud (2013)Grails in the Cloud (2013)
Grails in the Cloud (2013)
 
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
 
MySQL Ecosystem in 2020
MySQL Ecosystem in 2020MySQL Ecosystem in 2020
MySQL Ecosystem in 2020
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControlWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #7: ClusterControl
 
Fudcon talk.ppt
Fudcon talk.pptFudcon talk.ppt
Fudcon talk.ppt
 

Mehr von Colin Charles

Mehr von Colin Charles (11)

Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
 
MySQL features missing in MariaDB Server
MySQL features missing in MariaDB ServerMySQL features missing in MariaDB Server
MySQL features missing in MariaDB Server
 
The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it! The MySQL ecosystem - understanding it, not running away from it!
The MySQL ecosystem - understanding it, not running away from it!
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
 
Capacity planning for your data stores
Capacity planning for your data storesCapacity planning for your data stores
Capacity planning for your data stores
 
Lessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companiesLessons from {distributed,remote,virtual} communities and companies
Lessons from {distributed,remote,virtual} communities and companies
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a package
 
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

MySQL in the Cloud

  • 1. MySQL in the Cloud Colin Charles, MariaDB/SkySQL Ab colin@mariadb.org | byte@bytebot.net http://mariadb.com/ | http://mariadb.org/ http://bytebot.net/blog/ | @bytebot on Twitter LinuxCon/CloudOpen, New Orleans, Louisiana, USA 17 September 2013 1
  • 2. whoami • Chief Evangelist, MariaDB at Monty Program SkySQL • Formerly MySQL AB/Sun Microsystems • Using/developing/hacking on MySQL since 2000 • Previously on FESCO for The Fedora Project, and worked on OpenOffice.org (2000-2005) 2
  • 3. Agenda • MySQL as a service offering (DBaaS) • Choices • Considerations • MySQL versions & access • Costs • Deeper into RDS • Should you run this on EC2 or an equivalent? • Conclusion 3
  • 4. MySQL as a service • Database as a Service (DBaaS) • MySQL available on-demand, without any installation/configuration of hardware/ software • Pay-per-usage based • Provider maintains MySQL, you don’t maintain, upgrade, or administer the database 4
  • 5. New way of deployment • Enter a credit card number • call API (or use the GUI) ec2-run-instances ami- xxx -k ${EC2_KEYPAIR} -t m1.large nova boot --image centos6-x86_64 --flavor m1.large db1 5 credit: http://www.flickr.com/photos/68751915@N05/6280507539/
  • 6. Why DBaaS? • “Couldn’t we just have a few more servers to handle the traffic spike during the elections?” • Don’t have a lot of DBAs, optimise for operational ease • Rapid deployment & scale-out 6
  • 7. Your choices today • Amazon Web Services Relational Database Service (RDS) • Rackspace Cloud Databases • Google Cloud SQL • HP Cloud Relational Database 7
  • 8. There are more • Jelastic - PaaS offering MySQL, MariaDB • ClearDB - MySQL partnered with heroku, appfog,Azure clouds • Joyent - Image offers Percona MySQL • Xeround - 2 weeks notice... 8
  • 9. Whom we won’t be covering • GenieDB - globally distributed MySQL as a service, master-master replication, works on EC2, Rackspace, Google Compute Engine, HP Cloud • ScaleDB - promises write scaling, HA clustering, etc. replacing InnoDB/MyISAM 9
  • 10. Regions & Availability Zones • Region: a data centre location, containing multiple Availability Zones • Availability Zone (AZ): isolated from failures from other AZs + low- latency network connectivity to other zones in same region 10
  • 11. Location, location, location • AWS RDS: US East (N.Virginia), US West (Oregon), US West (California), EU (Ireland), APAC (Singapore),APAC (Tokyo),APAC (Sydney), South America (São Paulo), GovCloud • Rackspace: USA (Dallas DFW, Chicago ORD, N.Virginia IAD),APAC (Sydney), EU (London)* • Google Cloud SQL: US, EU • HP Cloud: US-East (Virginia), US-West 11
  • 12. Service Level Agreements (SLA) • AWS - 99.95% in a calendar month • Rackspace - 99.9% in a calendar month • Google - 99.95% in a calendar month • HP Cloud - no SLA yet, services in beta • SLAs exclude “scheduled maintenance” • AWS is 30 minutes/week, so really 99.65% 12
  • 13. Support • AWS - forums; $49/mo gets email; $100+ phone # • Rackspace - live chat, phone #, forums • Google - forums; $150/mo gets support portal; $400+ for phone # • HP Cloud - phone #, chat, customer forum 13
  • 14. Who manages this? • AWS: self-management, Enterprise ($15k+) • Rackspace: $100 + 0.04 cents/hr over regular pricing • Google: self-management • HP Cloud: self-management 14
  • 15. MySQL versions • AWS: MySQL Community 5.1.71, 5.5.33, 5.6.13 • Rackspace: MySQL Community 5.1 • Google: MySQL Community 5.5 • HP Cloud: Percona Server 5.5.28 15
  • 16. Access methods • AWS - within Amazon, externally via mysql client,API access. • Rackspace - private hostname within Rackspace network, standard mysql client,API access. • Google - within AppEngine, or a command line Java tool (gcutil) • HP Cloud - within HP Cloud, externally via client (trove-cli, reddwarf) or API access. 16
  • 17. Can you configure MySQL? • You don’t access my.cnf naturally • In AWS you have parameter groups which allow configuration of MySQL 17 source: http://www.mysqlperformanceblog.com/2013/08/21/amazon-rds-with-mysql-5-6-configuration-variables/
  • 18. Cost • Subscribe to relevant newsletters of your services • Cost changes rapidly, plus you get new instance types and new features (IOPS) • Don’t forget network access costs • Monitor your costs daily, hourly if possible (EC2 instances can have spot pricing) • https://github.com/ronaldbradford/aws 18
  • 19. Costs:AWS • AWS prices vary between regions • http://aws.amazon.com/rds/pricing/ 19
  • 20. Costs:AWS II • Medium instances (3.75GB) useful for testing ($2,411/yr) • Large instance (7.5GB) production ready ($4,777/ yr) • XL instance (15GB, 8ECUs) ($9,555/yr) • m2.2XL instance (34GB, 13ECUs, 500Mbps PIOPS) ($16,568/yr) • m2.4XL instance (68GB, 26ECUs, 1000Mbps PIOPS) ($33,048/yr) 20
  • 21. Costs: Rackspace • Option to have regular Cloud Database or Managed Instances • 4GB instance (testing) is $3,504/yr • 8GB instance (production) is $6,658/yr • Consider looking at I/O priority, and the actual TPS you get 21
  • 22. Costs: Google • You must enable billing before you create Cloud SQL instances • https://developers.google.com/cloud-sql/docs/billing • Testing (D8 - 4GB RAM) - ($4,274.15) • XL equivalent for production (D16 - 8GB RAM) - ($8,548.30) • Packages billing plans are cheaper than per-use billing plans 22
  • 23. Costs: HP Cloud • Its currently in beta • Its free... 23
  • 24. Where do you host your application? • Typically within the compute clusters of the service you’re running the DBaaS in • This also means your language choices are limited based on what the platform offers (eg.AppEngine only recently started offering PHP) 24
  • 25. RDS: Multi-AZ • Provides enhanced durability (synchronous data replication) • Increased availability (automatic failover) • Warning: can be slow (1-10 mins+) • Easy GUI administration • Doesn’t give you another usable “read- replica” though 25
  • 26. External replication • MySQL 5.6 you can do RDS -> Non-RDS • enable backup retention, you now have binlog access • You still can’t replicate INTO RDS • use Tungsten Replicator • also supports going from RDS to Rackspace/etc. 26
  • 27. MySQL 5.6, MariaDB 10 • MySQL 5.6 in RDS provides crash-safe slaves, the InnoDB memcached interface, online schema changes, full-text InnoDB indexes, optimizer improvements, INFORMATION_SCHEMA enhancements, scalability/replication improvements, PERFORMANCE_SCHEMA enhancements • MariaDB 10 has that, plus multi-source replication, GTIDs that don’t require full restarts, threadpool, audit plugin and more 27
  • 28. Getting started • Importing data into the cloud? • RDS: mysqldump is a good choice • Google Cloud SQL is only via existing Google Cloud Storage • Upgrading from RDS 5.5 to RDS 5.6? • mysqldump! 28
  • 29. Handling backups • You don’t get to use xtrabackup! • Google Cloud SQL automates backups (has a backup window) • Amazon has automated backups (with point-in-time recovery), with full daily snapshots (has a backup window). 29
  • 30. Monitoring • Options are limited,AWS has the best options currently available • Today you have CloudWatch • Google has basic read/write graphs 30
  • 31. Storage Engines • MySQL (/MariaDB) has many • cool ones include TokuDB, SPIDER, CONNECT, CassandraSE • You basically use InnoDB and MyISAM with cloud solutions • MyISAM on RDS won’t guarantee point- in-time recovery, snapshot restore 31
  • 32. High Availability • Plan for node failures • Don’t assume node provisioning is quick • Backup, backup, backup! • “Bad” nodes exist • HA is not equal across options - RDS wins so far 32
  • 33. Unsupported features • AWS: GTIDs, InnoDB Cache Warming, InnoDB transportable tablespaces, authentication plugins, semi-sync replication • Google: UDFs, replication, LOAD DATA INFILE, INSTALL PLUGIN, SELECT ... INTO OUTFILE 33
  • 34. Provisioned IOPS • Only available on Amazon • Faster, predictable, consistent I/O performance with low latencies • Good throughput, RAID on backed • EBS is more reliable 34
  • 35. More on RDS • log access via API • no SUPER access to skip replication errors easily • sync_binlog=0 not available • no OS access (sar, ps, swap?, tcpdump) • https://github.com/boto/boto 35
  • 36. Warning: automatic upgrades • Regressions happen even with a minor version upgrade in the MySQL world • InnoDB update that modifies rows PK triggers recursive behaviour until all disk space is exceeded? 5.5.24->5.5.25 (fixed: 5.5.25a) • Using query cache for partitioned tables? Disabled since 5.5.22->5.5.23! 36
  • 37. Benchmarking for use • sysbench • OLTP test, use tables with 20M rows and 20M transactions, check 1-128 threads/run (run this on RDS, Rackspace) • June 2013, tps, performance per dollar, Rackspace delivers more performance across all flavours except 512MB instance • Yahoo! Cloud Serving Benchmark • https://github.com/brianfrankcooper/YCSB 37
  • 38. Roadmaps? • There don’t seem to be public roadmaps. You find out when there’s a change! • Expect more to move to MySQL 5.6 • except Google, who will probably move to MariaDB 10.0 • maybe Rackspace is up in the air? 38
  • 39. Running MySQL in EC2 • Can do multiple geographic regions via replication • Run just one Percona Server/ MariaDB server/instance • Use additional EBS volumes for InnoDB tablespaces • RAID EBS volumes (RAID1) • Warm up data partitions, mount partitions with noatime, nodirtime • Vertical scaling with SSD-backed storage • Monitoring with nagios • Snapshot backups and save to S3 • Can use Elastic Load Balancer • Can use spot instances • Can use tools like MHA to provide automatic failover • Can use MariaDB Galera Cluster/ Percona XtraDB Cluster 39
  • 40. Some closing thoughts • Hardware varies per region • Sometimes, software manageability varies per region • Beware cost on your credit card! 40
  • 41. Q&A.ThankYou. colin@mariadb.org | byte@bytebot.net http://bytebot.net/blog/ | @bytebot on Twitter Download MariaDB and give it a try: http://mariadb.org/ 41