Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Aurora ServerlessZero to Serverless in 60 seconds
1
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2
Agenda
1. Evolution of AWS Aurora
2. Relational database and resource utilization
3. What is AWS Aurora Serverless?
4. Simplified experience and use cases
5. Demonstration
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Evolution of AWS Aurora
3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Evolution of Compute and Storage
4
AWS EC2 becomes publicly
available, 2006
2009, AWS Relational Database Service for MySQL becomes publicly available
2013, AWS RDS supports MySQL, Oracle, SQL Server, PostgreSQL
2015, AWS Aurora MySQL-compatible edition becomes publicly available
2017, AWS Aurora PostgreSQL-compatible edition becomes publicly available
AWS Lambda becomes publicly available, 2014
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is AWS Aurora?
5
• Managed MySQL/PostgreSQL compatible relational database product built for AWS Cloud
• Innovative elastic storage, no provisioned IOPs
• Highly durable and available by design
• License headache free
• Backed by AWS’s engineering talent and culture of customer obsession
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Aurora Architecture
6
….
Aurora multi-tenant storage VPC
Client
apps
RDS Instance VPCsCustomer’s VPC
AZ 1
AZ 2
AZ 3
DB
Engine
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is AWS Aurora? Spot a server hiding in plain sight
7
Client
appsAZ 1
AZ 2
AZ 3
DB
Engine
process
A virtual server
provided by EC2
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational databases and resource utilization
8
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Capacity planning isn’t easy
9
0
20
40
60
80
100
1201 5 9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
CPU Connections Capacity
0
20
40
60
80
100
120
1 5 9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
CPU Connections Capacity
0
20
40
60
80
100
120
1 5 9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
CPU Connections Capacity
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What causes inefficient resource utilization?
• Inherently irregular/cyclical workloads
• Costs associated with real-time capacity management
• Potential workload disruptions when adjusting database capacity
Customers often over-provision relational databases for worst-case workloads.
10
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Aurora Serverless is the next step
11
Summer 2018, AWS Aurora Serverless for MySQL becomes publicly available
Aurora Serverless is a solution to access
relational database software running in a Cloud
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is AWS Aurora Serverless?
12
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless makes database compute elastic
13
Application
Database endpoint
Request Router
Scalable DB
Capacity
Scalable storage
Warm pool of compute capacity
• Starts up on demand, shuts down when not in use
• Scales up/down automatically
• No application impact when scaling
• Pay per second, 5 minute minimum
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless: Pause/Resume, Scaling
• Database is automatically paused when it has no open connections for 5m -24h (customer configurable)
• Database is resumed automatically when first connection arrives
• Database is scaled up if during 10 minutes period metrics indicate that• It runs at 70%+ CPU utilization
• It runs at 90%+ connections
• Database is scaled down if during 10 minutes period metrics indicate that
• It runs below 30% CPU utilization
• It runs below 40% connections
14
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Here are the results
15
• Get the capacity that you need!
• Pay for what you get!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How did we do it?
16
Request
Router
Old
node
New
node
Aurora
Serverless
Control Plane
Scaling request contains
encrypted and signed
routing information. Only
Router can decrypt it
Encrypted session state
is being sent to Router
and restored on a new
backend. Router has no
key to decrypt session
state
Aurora
Storage
Ap
plic
atio
n
NLB
Service VPCCustomer’s VPC
Database
VPC Endpoint
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Simplified experience and use cases
17
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Simpler experience: less to worry about
Goal - have customers get started in minutes!
• No CPU credits to monitor• No commitment to particular availability zone • No migrations between instance type generations• No DB instance reservations to manage• No instances to manage• Encryption at REST is always enabled• No need to manually suspend, resume or scale database• No DNS propagation delays• No maintenance window• No old database versions to upgrade
18
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sample Use-Cases: Pause/Resume
• Data store for periodic jobs/reports (daily, weekly, monthly...)
• Non-customer interactive applications
• Retriable workloads - back-office applications
• Back testing - restore snapshots to Aurora Serverless
• Dev / test environments
• Educational / training
• Demos
19
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sample Use-Cases: Auto-Scaling
• OLTP data stores with variable workloadAutomatic adjusting to load cyclicality
• Consolidated DatabasesSimpler capacity management for multi-tenant services
• Scheduled autoscalingScale up or down at specific times of the day when you have known loads coming in or dropping off (requires some custom event processing)
20
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How can I migrate?To Aurora MySQL To Aurora
Serverless for
MySQL
Restore from
Snapshot ✓ ✓
Dump & Load ✓ ✓AWS Data
Migration Service ✓ ✓
Transaction Log
Replication ✓ ✗
Restore from S3 ✓ ✗
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is the availability story?
Aurora MySQL
(Multi-AZ)
Aurora MySQL
(Single-AZ)
Aurora
Serverless for
MySQL
Fast Failover ✓ ✗ ✗Cross-AZ
failover ✓ ✗ ✓
Storage
HA/Durability✓ ✓ ✓
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demonstration
23
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Q&A and Related Talks
24
14:20 Polyglot and Containers Kathy Gibbs
14:20 Deep Dive on MySQL Databases on Amazon Chayan Biswas
15:20 Top 10 Mistakes when Migrating from Oracle to PG Jim Mlodgenski
16:30 Tips and Tricks with Amazon RDS for PostgreSQL Denis Lussier
17:00 Understanding this Important Update Optimization Jim Mlodgenski
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://us-w
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Go back to the bash shell and use mysqlslap to put some load on the host:
In the following example, we are testing with an auto-generated SQL query that runs against a table
with 5 numeric columns and 20 character type columns. We are also simulating 50 client connections
and we want the test to repeat 100 times:
sudo mysqlslap --user=sysadmin --password --host=localhost --concurrency=50 --iterations=10 --number-int-cols=5 --number-char-cols=20 --auto-generate-sql --verbose
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Seamless Scaling in Action
Mimicking a Periodic Variable Workload on Multiple Clusters –
For each cluster we create cluster; allow MS to scale cluster down due to lack of usage; use
MySQLSlap to drive CPU load; check cluster scales back up; delete cluster