SlideShare ist ein Scribd-Unternehmen logo
1 von 26
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
MySQL and MariaDB
John McGrath
johmcgr@amazon.com
Startup Solutions Architect
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A Brief History of MySQL
• World’s most commonly used relational database
• Key component of the LAMP open source web application software stack
• Used in open source applications such as WordPress, Joomla, Redmine, and Drupal
• History
• First released in 1995 in Sweden by MySQL AB
• Acquired by Sun in 2008
• Launched as first Amazon RDS engine in 2009
• Acquired by Oracle in 2010
• Popular Branches
• MySQL Community Edition
• MySQL Enterprise Edition
• MariaDB Server
• Percona Server
• Amazon Aurora MySQL
Amazon RDS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MySQL is the “M” in the LAMP stack
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Managed MySQL Compatible Engines at AWS
Standard
The open source
standard MySQL
Community
The popular
community choice
Amazon Aurora
Performance
The fastest MySQL
compatible engine
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
RDS MySQL
• Most popular open-source database engine
• Support for MySQL Community Edition versions 5.5, 5.6 and 5.7
• InnoDB and MyISAM storage engines
• Version 5.7 - New Features
– JSON support
– Query optimizer improvements
– GIS extensions
– Improved parallel replication
– Dynamic buffer pool resizing
• Version 8.0 coming soon
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
RDS MariaDB
• Support for versions 10.0, 10.1, and 10.2
• Same instance, regions, pricing as RDS MySQL (including free tier)
• Differences from RDS MySQL
– XtraDB and Aria storage engines only
– Thread Pooling
– GTID
• Version 10.2 - New Features
– InnoDB now default storage engine
– Multiple triggers on the same event
– Auto-partition of table cache
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora
• Built from the ground up to leverage AWS
• MySQL 5.6 compatible with up to 5x better
performance on the same hardware:
100,000 writes/sec and 500,000 reads/sec
• Scalable with up to 64 TB in single database, up
to 15 read replicas
• Highly available, durable, and fault-tolerant
custom SSD storage layer: 6-way replicated
across 3 Availability Zones
• Transparent encryption for data at rest using
AWS KMS
• Stored procedures in Amazon Aurora can invoke
AWS Lambda functions
• MySQL 5.7 in preview
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
RDS Best Practices
• Leverage Multi-AZ Configurations
– Pros: High availability for planned and unplanned events
– Cons: Additional hourly charge, increased latency
• Leverage Read Replicas
– Pros: Read scalability, disaster recovery, upgrades
– Cons: Application must handle asynchronous behavior, watch log storage on master
• Leverage Enhanced Monitoring
– Pros: Additional information for tuning and troubleshooting
– Cons: CloudWatch Logs charge (small)
* Excluding micro instance classes
CloudWatch Enhanced Monitoring
50+ system/OS metrics | sorted process list view | 1-60 sec granularity
alarms on specific metrics | egress to CloudWatch Logs | integration with 3rd-party tools
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Measures “DB Load,” aka Average
Active Sessions
• Identifies source of bottlenecks
– Easy
– Powerful
– Top SQL
• Enables problem discovery
• Adjustable timeframe
– Hour, day, week, and longer
• Coming soon for Amazon Aurora
MySQL, Amazon RDS for MySQL,
and Amazon RDS for MariaDB
Amazon RDS Performance Insights
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MariaDB Audit Plug-in for MariaDB and MySQL
• Provides customer configurable event logging for database activity
– Auditable events include logins, queries, and tables accessed
– Individual users can be included or excluded from the audit
• The MariaDB audit plug-in is supported on RDS versions
of MariaDB and MySQL
• Available via RDS option group
• Can impact server performance
– up to 10% penalty for full logs
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MySQL & MariaDB Best Practices
• Use RDS provided stored procedures for managing sessions, queries, and read
replicas
– mysql.rds_kill(processID) to terminate a connection
– mysql.rds_kill_query(queryID) to terminate a query
– mysql.rds_stop_replication manually stop replication
– mysql.rds_skip_repl_error to skip the current replication error
– mysql.rds_next_master_log to change the master log position on the replica
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MySQL & MariaDB Logging Best Practices
• Enable MySQL general and slow query logs for troubleshooting
– The logs can be written to a CSV table or file
– The long_query_time database parameter sets the threshold for slow queries
– Avoid large CSV table logs by using stored procedures to rotate the logs
• mysql.rds_rotate_general_log
• mysql.rds_rotate_slow_log
– Disable the general and slow query logs if they are not actively being used for
diagnosis or troubleshooting
• The general and slow query logs can impact database performance, especially if
long_query_time is set to a low value
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MySQL & MariaDB Replication Tips
• Replicas can be made writeable
– Useful for changes like adding an index for reporting
– Think of it as “breaking the warranty”
• RDS supports managed replication chaining (source > target > target)
– Replica in one region and then a cross-region replica in another region
• RDS limits 5 replicas to per master (can be extended upon request)
• RDS instances support non-managed replication
– Useful for on-premises to RDS, EC2 to RDS scenarios
– Uses stored procedures rather than service API for managing
• RDS MariaDB provides crash-safe replication using Global Transaction
Identifiers (GTIDs)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MySQL & MariaDB Storage Types
• The type of storage can make a big difference for I/O intensive operations
– Magnetic – Low cost but IOPS and latency can vary
– General Purpose (GP2) – SSD based storage with 3K IOPS burst capability then a
baseline rate of 3 IOPS per GB. Throttled via a credit-based system. Great for
storage below 1 TB especially when you do not deplete credits.
– Provisioned IOPS (PIOPS) – SSD based storage with defined IOPS rates. Great
when you need consistent performance or when you need very high performance.
– For almost all use cases we recommend an SSD-based storage type
– Magnetic storage has average IOPS and latencies that are an order of magnitude
slower than SSD-based storage.
– GP2 is the default and makes sense until you start to go above 1 TB.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MySQL & MariaDB Storage Best Practices
• Fast, consistent storage is important since many routine operations can be
heavily I/O dependent
– Crash Recovery – InnoDB/XtraDB needs to scan through certain files as well as
rollback and roll-forward transactions.
– Engine Upgrades – MySQL scans through all tablespaces during a minor or major
engine version upgrade.
– DDL – MySQL can do online DDL which means it is copying a potentially large table.
Index creations and rebuilds also are I/O intensive.
• Multi-AZ failovers can be less than a minute with most of the downtime in DNS
propagation
– If MySQL needs to do a crash recovery or other I/O intensive operation before it can
start, the speed of storage could mean downtime is several minutes or even hours
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
MySQL & MariaDB Storage Tips
• GP2 is a great choice but be careful about burst credits on volumes < 1TB
– Hitting credit depletion results in IOPS drop. Latency and queue depth metrics will
spike until credits are replenished.
– Monitor read/write IOPS to see if average IOPS is greater than the baseline.
• Think of GP2 burst rate and PIOPS stated rate as maximum I/O rates.
– Your application needs to actually run an I/O intensive workload to hit these rates
– Multi-AZ introduces an extra commit
latency so MAZ IOPS will typically be
lower compared to SAZ
• Use EBS-optimized instance type
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Running MySQL in Amazon EC2
• Install
– Install a MySQL distribution via yum or choose a pre-built machine image from the AWS
Marketplace
– Consider using EBS volumes vs. ephemeral disks
• Configure
– Operating System Configuration
– Networking and Security Configuration
• Backup/restore
– mysqldump, MySQL Enterprise Backup, Percona XtraBackup
• Cluster/replicate
– Semi-synchronous replication
– Galera Cluster/MySQL Cluster/Percona Cluster
• Monitor
– Leverage AWS CloudWatch for OS metrics
– MySQL Monitoring tools—DataDog, Percona, VividCortex, WebYog
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Benefits of Running Managed MySQL
• Managed high availability through automated
failover across multiple data centers
• Managed disaster recovery with to the minute
point-in-time recovery
• Managed read scaling through read replicas
• Push button provisioning, automated instance
and storage scaling, patching, upgrades,
security, and general care and feeding
• Lower TCO because we manage the muck
– Get more leverage from your teams
– Focus on the things that differentiate you
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
“Amazon RDS allowed us to focus
a little less on MySQL
administration and a little more
scaling out the rest of our service."
- Joey Parsons
Head of Operations at Flipboard
”
“
Flipboard is one of the world's first social magazines. Inspired
by the beauty and ease of print media, the company’s mission
is to fundamentally improve how people discover, view, and
share content across their social networks.
• From the beginning, Flipboard has
run its infrastructure on Amazon Web
Services
• One key decision was to use MySQL,
and in turn, Amazon RDS
• Flipboard uses Amazon RDS for
MySQL and its Multi-AZ capabilities
to store mission critical user data
• Key features are auto minor version
upgrade, automatic backups, easy
restores, and the ability to spin up
read replicas to add capacity
Customer Story: Flipboard
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Migrating your MySQL Database into AWS
• Data Import Options
– Use mysqldump and mysql command line
– Use mysqlimport on EC2 instance
– Use external replication into AWS for minimizing downtime
– Use AWS Database Migration Services
(heterogeneous migrations/database consolidation)
• Import Backup from Amazon S3
– New for RDS MySQL
– Create full or incremental backup
with Percona XtraBackup 2.3
– Use AWS IAM role to access S3 bucket
– Use replication to catch up to changes in the
source database (if necessary)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Configuring your MySQL instance for data loading
• Turn off backup retention (disables binlog)
• Turn off autocommit mode
• Drop indexes and disable foreign keys
• For EBS-based engines
– Use EBS-optimized instance types
– Maximize storage IOPS
• Optimize parameter settings
– innodb_flush_log_at_trx_commit, innodb_io_capacity,
innodb_io_read_threads, innodb_io_write_threads, sync_binlog
• Remember to re-enable settings after load completes!
Getting started with Amazon RDS for MariaDB
Information
https://aws.amazon.com/rds/mariadb
Pricing
https://aws.amazon.com/rds/mariadb/pricing/
MariaDB user guide
https://docs.aws.amazon.com/AmazonRDS/lates
t/UserGuide/CHAP_MariaDB.html
Getting started with Amazon RDS for MySQL
Information
https://aws.amazon.com/rds/mysql/
Pricing
https://aws.amazon.com/rds/mysql/pricing/
MySQL user guide
http://docs.aws.amazon.com/AmazonRDS/latest
/UserGuide/CHAP_MySQL.html
Getting started with Amazon Aurora
Information
https://aws.amazon.com/aurora/
Pricing
https://aws.amazon.com/aurora/pricing/
Aurora user guide
http://docs.aws.amazon.com/AmazonRDS/latest
/UserGuide/CHAP_Aurora.html
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
aws.amazon.com/activate
Everything and Anything Startups
Need to Get Started on AWS

Weitere ähnliche Inhalte

Was ist angesagt?

Amazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service MeetupAmazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service Meetupcyrilkhairallah
 
Migrating and Running DBs on Amazon RDS for Oracle
Migrating and Running DBs on Amazon RDS for OracleMigrating and Running DBs on Amazon RDS for Oracle
Migrating and Running DBs on Amazon RDS for OracleMaris Elsins
 
Mining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMaris Elsins
 
Oracle Databases on AWS - Getting the Best Out of RDS and EC2
Oracle Databases on AWS - Getting the Best Out of RDS and EC2Oracle Databases on AWS - Getting the Best Out of RDS and EC2
Oracle Databases on AWS - Getting the Best Out of RDS and EC2Maris Elsins
 
An AWS DMS Replication Journey from Oracle to Aurora MySQL
An AWS DMS Replication Journey from Oracle to Aurora MySQLAn AWS DMS Replication Journey from Oracle to Aurora MySQL
An AWS DMS Replication Journey from Oracle to Aurora MySQLMaris Elsins
 
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon Web Services
 
How MariaDB is approaching DBaaS
How MariaDB is approaching DBaaSHow MariaDB is approaching DBaaS
How MariaDB is approaching DBaaSMariaDB plc
 
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksHow to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksAmazon Web Services
 
Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017
Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017
Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017Amazon Web Services
 
AWS Webcast - Migrating to RDS Oracle
AWS Webcast - Migrating to RDS OracleAWS Webcast - Migrating to RDS Oracle
AWS Webcast - Migrating to RDS OracleAmazon Web Services
 
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance DatabaseDay 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance DatabaseAmazon Web Services
 
Introduction to Amazon Relational Database Service
Introduction to Amazon Relational Database ServiceIntroduction to Amazon Relational Database Service
Introduction to Amazon Relational Database ServiceAmazon Web Services
 
MongoDB and AWS: Integrations
MongoDB and AWS: IntegrationsMongoDB and AWS: Integrations
MongoDB and AWS: IntegrationsMongoDB
 
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration  AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration Amazon Web Services
 

Was ist angesagt? (20)

Amazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service MeetupAmazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service Meetup
 
Migrating Oracle to PostgreSQL
Migrating Oracle to PostgreSQLMigrating Oracle to PostgreSQL
Migrating Oracle to PostgreSQL
 
Migrating and Running DBs on Amazon RDS for Oracle
Migrating and Running DBs on Amazon RDS for OracleMigrating and Running DBs on Amazon RDS for Oracle
Migrating and Running DBs on Amazon RDS for Oracle
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Amazon Aurora
Amazon AuroraAmazon Aurora
Amazon Aurora
 
Mining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMining AWR V2 - Trend Analysis
Mining AWR V2 - Trend Analysis
 
Oracle Databases on AWS - Getting the Best Out of RDS and EC2
Oracle Databases on AWS - Getting the Best Out of RDS and EC2Oracle Databases on AWS - Getting the Best Out of RDS and EC2
Oracle Databases on AWS - Getting the Best Out of RDS and EC2
 
An AWS DMS Replication Journey from Oracle to Aurora MySQL
An AWS DMS Replication Journey from Oracle to Aurora MySQLAn AWS DMS Replication Journey from Oracle to Aurora MySQL
An AWS DMS Replication Journey from Oracle to Aurora MySQL
 
Intro to AWS: Database Services
Intro to AWS: Database ServicesIntro to AWS: Database Services
Intro to AWS: Database Services
 
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
 
How MariaDB is approaching DBaaS
How MariaDB is approaching DBaaSHow MariaDB is approaching DBaaS
How MariaDB is approaching DBaaS
 
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksHow to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
 
Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017
Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017
Migrating Your SQL Server Databases to Amazon RDS - DAT312 - re:Invent 2017
 
AWS Webcast - Migrating to RDS Oracle
AWS Webcast - Migrating to RDS OracleAWS Webcast - Migrating to RDS Oracle
AWS Webcast - Migrating to RDS Oracle
 
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance DatabaseDay 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
 
Introduction to Amazon Relational Database Service
Introduction to Amazon Relational Database ServiceIntroduction to Amazon Relational Database Service
Introduction to Amazon Relational Database Service
 
MongoDB and AWS: Integrations
MongoDB and AWS: IntegrationsMongoDB and AWS: Integrations
MongoDB and AWS: Integrations
 
Amazon Aurora: Under the Hood
Amazon Aurora: Under the HoodAmazon Aurora: Under the Hood
Amazon Aurora: Under the Hood
 
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration  AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
AWS Webcast - Amazon RDS for Oracle: Best Practices and Migration
 

Ähnlich wie MySQL and MariaDB

10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech TalksAmazon Web Services
 
What’s New in Amazon RDS for Open-Source and Commercial Databases
What’s New in Amazon RDS for Open-Source and Commercial DatabasesWhat’s New in Amazon RDS for Open-Source and Commercial Databases
What’s New in Amazon RDS for Open-Source and Commercial DatabasesAmazon Web Services
 
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018Amazon Web Services
 
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon Web Services
 
DAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWSDAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWSAmazon Web Services
 
What’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS SummitWhat’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS SummitAmazon Web Services
 
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018Amazon Web Services
 
Oracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFOracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFAmazon Web Services
 
Oracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoOracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoAmazon Web Services
 
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech TalksDeep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech TalksAmazon Web Services
 
What's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitWhat's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitAmazon Web Services
 
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarRelational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarAmazon Web Services
 
Oracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudOracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudAmazon Web Services
 
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
 SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDSAmazon Web Services
 
Oracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinOracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinAmazon Web Services
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWSAmazon Web Services
 

Ähnlich wie MySQL and MariaDB (20)

MySQL and MariaDB
MySQL and MariaDBMySQL and MariaDB
MySQL and MariaDB
 
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
 
What’s New in Amazon RDS for Open-Source and Commercial Databases
What’s New in Amazon RDS for Open-Source and Commercial DatabasesWhat’s New in Amazon RDS for Open-Source and Commercial Databases
What’s New in Amazon RDS for Open-Source and Commercial Databases
 
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
 
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
 
DAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWSDAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWS
 
What’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS SummitWhat’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS Summit
 
Amazon RDS_Deep Dive - SRV310
Amazon RDS_Deep Dive - SRV310 Amazon RDS_Deep Dive - SRV310
Amazon RDS_Deep Dive - SRV310
 
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
 
Oracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFOracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SF
 
Oracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoOracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San Francisco
 
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech TalksDeep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
 
What's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitWhat's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS Summit
 
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarRelational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
 
Oracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudOracle and SQL Server on the Cloud
Oracle and SQL Server on the Cloud
 
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
 SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
 
Oracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinOracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill Baldwin
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWS
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 

Mehr von Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

MySQL and MariaDB

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft MySQL and MariaDB John McGrath johmcgr@amazon.com Startup Solutions Architect
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A Brief History of MySQL • World’s most commonly used relational database • Key component of the LAMP open source web application software stack • Used in open source applications such as WordPress, Joomla, Redmine, and Drupal • History • First released in 1995 in Sweden by MySQL AB • Acquired by Sun in 2008 • Launched as first Amazon RDS engine in 2009 • Acquired by Oracle in 2010 • Popular Branches • MySQL Community Edition • MySQL Enterprise Edition • MariaDB Server • Percona Server • Amazon Aurora MySQL Amazon RDS
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MySQL is the “M” in the LAMP stack
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Managed MySQL Compatible Engines at AWS Standard The open source standard MySQL Community The popular community choice Amazon Aurora Performance The fastest MySQL compatible engine
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved RDS MySQL • Most popular open-source database engine • Support for MySQL Community Edition versions 5.5, 5.6 and 5.7 • InnoDB and MyISAM storage engines • Version 5.7 - New Features – JSON support – Query optimizer improvements – GIS extensions – Improved parallel replication – Dynamic buffer pool resizing • Version 8.0 coming soon
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved RDS MariaDB • Support for versions 10.0, 10.1, and 10.2 • Same instance, regions, pricing as RDS MySQL (including free tier) • Differences from RDS MySQL – XtraDB and Aria storage engines only – Thread Pooling – GTID • Version 10.2 - New Features – InnoDB now default storage engine – Multiple triggers on the same event – Auto-partition of table cache
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Aurora • Built from the ground up to leverage AWS • MySQL 5.6 compatible with up to 5x better performance on the same hardware: 100,000 writes/sec and 500,000 reads/sec • Scalable with up to 64 TB in single database, up to 15 read replicas • Highly available, durable, and fault-tolerant custom SSD storage layer: 6-way replicated across 3 Availability Zones • Transparent encryption for data at rest using AWS KMS • Stored procedures in Amazon Aurora can invoke AWS Lambda functions • MySQL 5.7 in preview
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved RDS Best Practices • Leverage Multi-AZ Configurations – Pros: High availability for planned and unplanned events – Cons: Additional hourly charge, increased latency • Leverage Read Replicas – Pros: Read scalability, disaster recovery, upgrades – Cons: Application must handle asynchronous behavior, watch log storage on master • Leverage Enhanced Monitoring – Pros: Additional information for tuning and troubleshooting – Cons: CloudWatch Logs charge (small) * Excluding micro instance classes
  • 9. CloudWatch Enhanced Monitoring 50+ system/OS metrics | sorted process list view | 1-60 sec granularity alarms on specific metrics | egress to CloudWatch Logs | integration with 3rd-party tools
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Measures “DB Load,” aka Average Active Sessions • Identifies source of bottlenecks – Easy – Powerful – Top SQL • Enables problem discovery • Adjustable timeframe – Hour, day, week, and longer • Coming soon for Amazon Aurora MySQL, Amazon RDS for MySQL, and Amazon RDS for MariaDB Amazon RDS Performance Insights
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MariaDB Audit Plug-in for MariaDB and MySQL • Provides customer configurable event logging for database activity – Auditable events include logins, queries, and tables accessed – Individual users can be included or excluded from the audit • The MariaDB audit plug-in is supported on RDS versions of MariaDB and MySQL • Available via RDS option group • Can impact server performance – up to 10% penalty for full logs
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MySQL & MariaDB Best Practices • Use RDS provided stored procedures for managing sessions, queries, and read replicas – mysql.rds_kill(processID) to terminate a connection – mysql.rds_kill_query(queryID) to terminate a query – mysql.rds_stop_replication manually stop replication – mysql.rds_skip_repl_error to skip the current replication error – mysql.rds_next_master_log to change the master log position on the replica
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MySQL & MariaDB Logging Best Practices • Enable MySQL general and slow query logs for troubleshooting – The logs can be written to a CSV table or file – The long_query_time database parameter sets the threshold for slow queries – Avoid large CSV table logs by using stored procedures to rotate the logs • mysql.rds_rotate_general_log • mysql.rds_rotate_slow_log – Disable the general and slow query logs if they are not actively being used for diagnosis or troubleshooting • The general and slow query logs can impact database performance, especially if long_query_time is set to a low value
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MySQL & MariaDB Replication Tips • Replicas can be made writeable – Useful for changes like adding an index for reporting – Think of it as “breaking the warranty” • RDS supports managed replication chaining (source > target > target) – Replica in one region and then a cross-region replica in another region • RDS limits 5 replicas to per master (can be extended upon request) • RDS instances support non-managed replication – Useful for on-premises to RDS, EC2 to RDS scenarios – Uses stored procedures rather than service API for managing • RDS MariaDB provides crash-safe replication using Global Transaction Identifiers (GTIDs)
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MySQL & MariaDB Storage Types • The type of storage can make a big difference for I/O intensive operations – Magnetic – Low cost but IOPS and latency can vary – General Purpose (GP2) – SSD based storage with 3K IOPS burst capability then a baseline rate of 3 IOPS per GB. Throttled via a credit-based system. Great for storage below 1 TB especially when you do not deplete credits. – Provisioned IOPS (PIOPS) – SSD based storage with defined IOPS rates. Great when you need consistent performance or when you need very high performance. – For almost all use cases we recommend an SSD-based storage type – Magnetic storage has average IOPS and latencies that are an order of magnitude slower than SSD-based storage. – GP2 is the default and makes sense until you start to go above 1 TB.
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MySQL & MariaDB Storage Best Practices • Fast, consistent storage is important since many routine operations can be heavily I/O dependent – Crash Recovery – InnoDB/XtraDB needs to scan through certain files as well as rollback and roll-forward transactions. – Engine Upgrades – MySQL scans through all tablespaces during a minor or major engine version upgrade. – DDL – MySQL can do online DDL which means it is copying a potentially large table. Index creations and rebuilds also are I/O intensive. • Multi-AZ failovers can be less than a minute with most of the downtime in DNS propagation – If MySQL needs to do a crash recovery or other I/O intensive operation before it can start, the speed of storage could mean downtime is several minutes or even hours
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved MySQL & MariaDB Storage Tips • GP2 is a great choice but be careful about burst credits on volumes < 1TB – Hitting credit depletion results in IOPS drop. Latency and queue depth metrics will spike until credits are replenished. – Monitor read/write IOPS to see if average IOPS is greater than the baseline. • Think of GP2 burst rate and PIOPS stated rate as maximum I/O rates. – Your application needs to actually run an I/O intensive workload to hit these rates – Multi-AZ introduces an extra commit latency so MAZ IOPS will typically be lower compared to SAZ • Use EBS-optimized instance type
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Running MySQL in Amazon EC2 • Install – Install a MySQL distribution via yum or choose a pre-built machine image from the AWS Marketplace – Consider using EBS volumes vs. ephemeral disks • Configure – Operating System Configuration – Networking and Security Configuration • Backup/restore – mysqldump, MySQL Enterprise Backup, Percona XtraBackup • Cluster/replicate – Semi-synchronous replication – Galera Cluster/MySQL Cluster/Percona Cluster • Monitor – Leverage AWS CloudWatch for OS metrics – MySQL Monitoring tools—DataDog, Percona, VividCortex, WebYog
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Benefits of Running Managed MySQL • Managed high availability through automated failover across multiple data centers • Managed disaster recovery with to the minute point-in-time recovery • Managed read scaling through read replicas • Push button provisioning, automated instance and storage scaling, patching, upgrades, security, and general care and feeding • Lower TCO because we manage the muck – Get more leverage from your teams – Focus on the things that differentiate you
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. “Amazon RDS allowed us to focus a little less on MySQL administration and a little more scaling out the rest of our service." - Joey Parsons Head of Operations at Flipboard ” “ Flipboard is one of the world's first social magazines. Inspired by the beauty and ease of print media, the company’s mission is to fundamentally improve how people discover, view, and share content across their social networks. • From the beginning, Flipboard has run its infrastructure on Amazon Web Services • One key decision was to use MySQL, and in turn, Amazon RDS • Flipboard uses Amazon RDS for MySQL and its Multi-AZ capabilities to store mission critical user data • Key features are auto minor version upgrade, automatic backups, easy restores, and the ability to spin up read replicas to add capacity Customer Story: Flipboard
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Migrating your MySQL Database into AWS • Data Import Options – Use mysqldump and mysql command line – Use mysqlimport on EC2 instance – Use external replication into AWS for minimizing downtime – Use AWS Database Migration Services (heterogeneous migrations/database consolidation) • Import Backup from Amazon S3 – New for RDS MySQL – Create full or incremental backup with Percona XtraBackup 2.3 – Use AWS IAM role to access S3 bucket – Use replication to catch up to changes in the source database (if necessary)
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Configuring your MySQL instance for data loading • Turn off backup retention (disables binlog) • Turn off autocommit mode • Drop indexes and disable foreign keys • For EBS-based engines – Use EBS-optimized instance types – Maximize storage IOPS • Optimize parameter settings – innodb_flush_log_at_trx_commit, innodb_io_capacity, innodb_io_read_threads, innodb_io_write_threads, sync_binlog • Remember to re-enable settings after load completes!
  • 23. Getting started with Amazon RDS for MariaDB Information https://aws.amazon.com/rds/mariadb Pricing https://aws.amazon.com/rds/mariadb/pricing/ MariaDB user guide https://docs.aws.amazon.com/AmazonRDS/lates t/UserGuide/CHAP_MariaDB.html
  • 24. Getting started with Amazon RDS for MySQL Information https://aws.amazon.com/rds/mysql/ Pricing https://aws.amazon.com/rds/mysql/pricing/ MySQL user guide http://docs.aws.amazon.com/AmazonRDS/latest /UserGuide/CHAP_MySQL.html
  • 25. Getting started with Amazon Aurora Information https://aws.amazon.com/aurora/ Pricing https://aws.amazon.com/aurora/pricing/ Aurora user guide http://docs.aws.amazon.com/AmazonRDS/latest /UserGuide/CHAP_Aurora.html
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft aws.amazon.com/activate Everything and Anything Startups Need to Get Started on AWS