Beruflich Dokumente
Kultur Dokumente
Aurora Serverless
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Related breakouts
Tuesday, November 27
What’s New in Amazon Aurora
1:00 PM - 2:00 PM | Venetian, Level 2, Titian 2202
Tuesday, November 27
DAT304 - Deep Dive on Amazon Aurora with MySQL Compatibility
6:15 PM – 7:15 PM | Venetian, Level 4, Marcello 4505
Thursday, November 29
Amazon Aurora Storage Demystified: How It All Works
2:30 PM - 3:30 PM | Venetian, Level 4, Lando 4305
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• RDS & Aurora fundamentals
• Aurora Serverless
• How it works
• What’s new?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon RDS is . . .
Cloud native engine Open source engines Commercial engines
RDS platform
• Automatic fail-over • Isolation & security • Advanced monitoring
• Backup & recovery • Industry compliance • Routine maintenance
• X-region replication • Automated patching • Push-button scaling
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RDS platform
• Automatic fail-over • Isolation & security • Advanced monitoring
• Backup & recovery • Industry compliance • Routine maintenance
• X-region replication • Automated patching • Push-button scaling
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scale-out, distributed, multi-tenant design . . .
Region
Caching
Transactions
Caching
… Transactions
Caching
… Transactions
Caching
Transactions
Caching
… Transactions
Caching
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
With provisioned Aurora, you size the master yourself
Region
-or- SQL
Transactions
Caching
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless . . .
• Scale capacity
• Shut down
• Start up
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example #1 – episodic dev-test workload
VolumeWriteIOPs, 120-hour window
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example #2 – mostly idle dev-test workload
VolumeWriteIOPs, 120-hour window
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example #3 – spiky gaming workload
VolumeWriteIOPs, 120-hour window
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example #4 – ecommerce production workload
VolumeWriteIOPs, 24-hour window
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
You have some choices to make . . .
Provision for peak Expensive
-or-
-or-
Hard
Continuously monitor and
• Requires experts
manually scale up/down
• Risks outages
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management
Region
Availability zone 1
App
Master
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management
Region
Availability zone 1
App
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management
Region
Availability zone 1
App
Cutover
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management
Region
Availability zone 1
App
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management
Region
Availability zone 1
App
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management
Region
Availability zone 1
App
Proxy
Cutover
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database capacity management – is hard
Region
Availability zone 1
App
Proxy
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless . . .
© 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.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does it work . . .
Region
Availability zone 1
App
Monitoring service
Warm-pool of Aurora instances
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1000
1500
2000
2500
3000
0
500
tps
1
12
23
34
45
56
67
78
89
100
111
122
133
144
155
166
177
188
199
210
221
232
243
254
265
276
287
298
309
320
331
342
353
364
375
How does it work in practice?
386
397
408
419
430
441
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
452
463
474
485
496
507
518
529
540
551
562
573
584
595
606
617
628
639
650
661
672
683
694
705
716
727
1000
1500
2000
2500
3000
0
500
tps
1
12
23
34
45
56
67
78
89
100
111
122
133
144
155
166
177
188
199
210
221
232
243
254
265
276
287
298
309
320
331
342
353
364
375
386
How does it work in practice?
397
408
419
430
441
452
463
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
474
485
496
507
518
529
540
551
562
573
584
595
606
617
628
639
650
661
672
683
694
705
716
727
738
1
2
4
8
16
32
64
ACU
128
50
100
150
200
250
300
350
400
450
500
0
ms
1
12
23
34
45
56
67
78
89
100
111
122
133
144
155
166
177
188
199
210
221
232
243
254
265
276
287
298
309
320
331
342
353
364
375
386
How does it work in practice?
397
408
419
430
441
452
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
463
474
485
496
507
518
529
540
551
562
573
584
595
606
617
628
639
650
661
672
683
694
705
716
727
0
ACU
10
20
30
40
50
60
70
1000
1500
2000
2500
3000
0
500
tps
1
12
23
34
45
56
67
78
89
100
111
122
133
144
155
166
177
188
199
210
221
232
243
254
265
276
287
298
309
320
331
342
353
364
375
386
How does it work in practice?
397
408
419
430
441
452
463
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
474
485
496
507
518
529
540
551
562
573
584
595
606
617
628
639
650
661
672
683
694
705
716
727
738
0
50
ms
100
150
200
250
300
350
400
450
500
That said . . .
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing RDS Data API
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing RDS Console Query Editor
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless – for PostgreSQL
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless – more regions
• Aurora Serverless newly available in:
• Seoul
• Singapore
• Sydney
• Mumbai
• N. California
• London, Paris
• Frankfurt
• Central Canada
© 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.
Invoking Data API from Lambda
ExecuteSqlRequest sqlRequest = new ExecuteSqlRequest();
Long peopleFromCityCount =
result.getSqlStatementResults().get(0).getResultFrame().getRecords()
.get(0).getValues().get(0).getBigIntValue();
https://github.com/aws-samples/amazon-rds-data-api-demo
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Joshua Eichorn
CTO
Pagely
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WordPress powers 32% of the Web
• More than blogs and CMS
• Ecommerce
• Membership sites
• Custom Apps
• Pagely brings
• Devops
• Scale
• Piece of mind
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Serverless Application Hosting
• Autoscaling
• Workflow
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Northstack High Level Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Details
• Using ECS for compute
• App gateway + workers can stop
• Each production app gets its own
Aurora Serverless
• For cacheable sites only the
gateway is running
Picture: Aurora 2010 / Michael R. P. Ragazzon / Creative Commons
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Elastic Database is Hard
• WordPress read after write limits slave usefulness
• Single tenant option
• Resizing a master means failover
• Failover = outage
• Multi-tenant option
• Constant balancing chore
• Noisy neighbors
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless a perfect fit
• Scales the master
• Scaling without downtime
• Less work needed from my team
• Pausing
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Things to watch out for
• Resume from pause time is
inconsistent
• Aurora needs a place to
scale
• MySQL server has gone
away errors
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Managing timeouts around pause
• Biggest cost savings come from pause
• Resume is high time variance
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A WordPress Slow query Story
• Full table scans of meta_value are common
• 2 ACU query takes 10 minutes
• 8 ACU query takes < 2 seconds
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Giving Aurora a place to scale
• Add query timeouts
• Be careful about global timeouts
• Not always easy Picture: Waimea expanse / Alex Schwab / Creative Commons
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
MySQL server has gone away errors
• More common with Aurora • Enable auto reconnect if possible
Serverless • Custom DB driver in WordPress to
• Timeouts increase occurrence catch and reconnect
• Sysown Proxysql
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.