Amazon Aurora is a fully managed relational database engine that provides higher performance, availability and durability than previously possible using conventional monolithic database architectures. After launching a year ago, we continued adding many new features and capabilities to Aurora. In this session AWS Aurora experts will discuss the best practices that will help you put these capabilities to the best use. You will also hear from Amazon Aurora customer Intercom on the best practices they adopted for moving live databases with over two billion rows to a new datastore in Amazon Aurora with almost no downtime or lost records.
Intercom was founded to provide a fundamentally new way for Internet businesses to communicate with customers at scale. For growing startups like Intercom, it’s natural for the load on datastores to grow on a weekly basis. The usual solution to this problem is to get a bigger box from AWS. But very soon you reach a point where bigger boat is not an option anymore. You will learn about the benefits of moving to such a datastore, the problems it introduced, and all about the new ability for scaling that was not there before.
2. What to Expect from the Session
• Migration best practices
• Performance best practices
• Real-time reporting and analytics
• Concurrent event stores
• Integration with AWS services
• Welcome Intercom!
3. Amazon Aurora
• MySQL-compatible relational
database
• Performance and availability of
commercial databases
• Simplicity and cost effectiveness of
open source databases
• Delivered as managed service
Fastest growing service
in AWS history
5. Amazon Aurora migration options
Source database From where Recommended option
RDS
EC2, on-premises
EC2, on-premises, RDS
Console based automated
snapshot ingestion and catch
up via binlog replication.
Binary snapshot ingestion
through S3 and catch up via
binlog replication.
Schema conversion using
SCT and data migration via
DMS.
6. DB snapshot migration
One-click migration from
RDS MySQL 5.6 to Aurora
Automatic conversion from
MyISAM to InnoDB
Most migrations take <1 hr,
longer for large databases
One click replication from
RDS MySQL to Amazon
Aurora
DB
Snapshot
One-click
Migrate
RDS MySQL
Master/Slave New Aurora
Cluster
7. Migrating from self-managed MySQL to Aurora
• Import MySQL snapshots into Aurora through
S3
1) Execute Percona XtraBackup
2) Upload database snapshot to S3
3) Import snapshot from S3 to Aurora cluster
4) Setup logical replication to catch-up
5) Transition database workload to Aurora
cluster
• Faster migration for large databases (1+ TB)
• Import schema and data in one operation
11. Data copy: Existing data is copied from source tables to tables on the target.
Chance data capture and apply: Changes to data on source are captured
while the tables are loaded. Once load is complete, buffered changes are
applied to the target.
Additional changes captured on the source are applied to the target until the task
stopped or terminatedAWS Database
Migration Service
AWS Schema
Conversion Tool
Oracle, SQL Server to Aurora Migration
Assessment report: SCT analyses the source database and provides a
report with a recommended target engine and information on automatic
and manual conversions
Code Browser and recommendation engine: Highlights places that require
manual edits and provides architectural and design guidelines.
14. Migration best practices
• Use the right migration approach for your use case
• Test, migrate, test again!
• Consolidate shards on Aurora
• Schema conversion
• Schema optimization post conversion
• For tables with wide text columns, enable DYNAMIC row format
• Primary key implementation differences
16. Aurora performance characteristics
Optimized for highly concurrent random access (OLTP)
Performance scales with number of connections
Consistent performance as number of
databases/schemas/tables increase
Consistent performance with increasing number of
Aurora read-replicas
Low replication lag
17. Performance testing
https ://d0.a wsstat ic . com /product -m ark eting/Aurora /R DS_ Auro ra_Perf orm ance_Assessm ent_Benchm ark ing_v 1-2 .pdf
AMAZON
AURORA
R3.8XLARGE
R3.8XLARGE
R3.8XLARGE
R3.8XLARGE
R3.8XLARGE
• Create an Amazon VPC (or use an existing one).
• Create four EC2 R3.8XL client instances to run the
SysBench client. All four should be in the same AZ.
• Enable enhanced networking on your clients.
• Tune your Linux settings (see whitepaper).
• Install Sysbench version 0.5.
• Launch a r3.8xlarge Amazon Aurora DB instance in
the same VPC and AZ as your clients.
• Start your benchmark!
1
2
3
4
5
6
7
18. Performance Best Practices
MySQL/RDBMS practices still apply
Choose the right tool for the right job (OLAP vs OLTP)
Create appropriate indexes
Tune your SQL code, use explain plans, performance schema
Leverage high concurrency
Aurora throughput increases with number of connections
Architect your applications to leverage high concurrency in Aurora
Read Scaling
Aurora offers read replicas with virtually no replication lag
Leverage multiple read replicas to distribute your reads
19. Performance Best Practices
Parameter tuning
No need to migrate your performance-related MySQL parameters to
Aurora
Aurora Parameter Groups are pre-tuned and already optimal in most
cases
Performance comparison
Don’t obsess over individual metrics (CPU, IOPS, IO throughput)
Focus on what matters, i.e., application performance
Other best practices
Keep query cache on
Leverage CloudWatch metrics
31. Aurora implementation (cost)
Aurora ClusterUser Applications
Most Operations
Served From Memory
Small Portion of IO
Requests Billed
Cost-Efficient
Storage
70. Related Sessions
• DAT203 - Getting Started with Amazon Aurora
• DAT303 - Deep Dive on Amazon Aurora
• DAT302 - Best Practices for Migrating from Commercial
Database Engines to Amazon Aurora or PostgreSQL