SlideShare a Scribd company logo
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Build resilient applications
using Amazon RDS and Aurora
PostgreSQL
D A T 3 1 6
Grant McAlister
Senior Principal Engineer
Amazon Web Services
Jim Mlodgenski
Principal Database Engineer
Amazon Web Services
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
• Planned and unplanned
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Primary
The case for resiliency
• Everything fails at some point
• Planned and unplanned
Availability Zone 1 Availability Zone 2
AWS Region
Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
The case for resiliency
• Everything fails at some point
• Planned and unplanned
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
The case for resiliency
• Everything fails at some point
• Planned and unplanned
• Does the system operate as designed
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The case for resiliency
• Everything fails at some point
• Planned and unplanned
• Does the system operate as designed
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
Standby Primary
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The case for resiliency
• Everything fails at some point
• Planned and unplanned
• Does the system operate as designed
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
Standby Primary
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The case for resiliency
• Everything fails at some point
• Planned and unplanned
• Does the system operate as designed
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
Standby Primary
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The case for resiliency
• Everything fails at some point
• Planned and unplanned
• Does the system operate as designed
• Grey failures
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
Standby Primary
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
1 2 3
4 5
6
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
1 2 3
4 5
6
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
writer reader
reader
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
writer reader
reader
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
reader
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
reader
writer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
reader
writer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
reader
writer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
1 2 3
4 5
6
reader
writer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
• AWS JDBC driver for faster
failover
1 2 3
4 5
6
reader
AWS
JDBC
writer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora with PostgreSQL compatibility
Availability Zone 1
AWS Region
Applications
Availability Zone 2 Availability Zone 3
Aurora Storage
Applications Applications
• 4 of 6 write quorum across 3
AZ’s
• Self repairing storage system
• One or more db instances per
AZ
• AWS JDBC driver for faster
failover
1 2 3
4 5
6
reader
AWS
JDBC
writer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Amazon RDS Multi-AZ with two readable standbys
• PostgreSQL replication across
3 AZ’s with a 2 of 3 quorum
• Write Ahead Log written to
local storage
• Failover time a factor of
transaction apply lag
Availability Zone 3
AWS Region Applications
Availability Zone 1
Primary
Availability Zone 2
Standby
WAL WAL WAL
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Amazon RDS Multi-AZ with one standby
• PostgreSQL community version with
easy configuration and management
• High availability across two availability
zones
• All writes synchronously replicated to
the standby
• Failover a factor of checkpoints
Availability Zone 1 Availability Zone 2
AWS Region Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Recovery Time
3 GiB Redo
Recovered in 19 seconds
10 GiB Redo
Recovered in 50 seconds
30 GiB Redo
Recovered in 123 seconds
0
20
40
60
80
100
120
140
160
0 20,000 40,000 60,000 80,000 100,000 120,000 140,000
Recovery
Time
in
Seconds
(less
is
better)
Writes / Second (more is better)
RECOVERY TIME FROM CRASH UNDER LOAD
Bubble size represents redo log, which must be recovered
As PostgreSQL
throughput goes up, so
does log size and crash
recovery time
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Recovery Time
3 GiB Redo
Recovered in 19 seconds
10 GiB Redo
Recovered in 50 seconds
30 GiB Redo
Recovered in 123 seconds
0
20
40
60
80
100
120
140
160
0 20,000 40,000 60,000 80,000 100,000 120,000 140,000
Recovery
Time
in
Seconds
(less
is
better)
Writes / Second (more is better)
RECOVERY TIME FROM CRASH UNDER LOAD
Bubble size represents redo log, which must be recovered
As PostgreSQL
throughput goes up, so
does log size and crash
recovery time
Amazon Aurora has no redo.
Recovered in 3 seconds while
maintaining greater throughput.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Failover time
0
50,000
100,000
150,000
200,000
250,000
300,000
350,000
400,000
0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200
Transactions
per
Second
(TPS)
Seconds
PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds
Baseline
32 seconds
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Failover time
0
50,000
100,000
150,000
200,000
250,000
300,000
350,000
400,000
0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200
Transactions
per
Second
(TPS)
Seconds
PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds
Baseline
340 seconds
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RO
Application
Cluster Cache Management (CCM) Feature
RW
Application
RO
Application
Async
Invalidation
& Update
Availability zone 1 Availability zone 3
Availability zone 2
Aurora
Storage
RO
RO
RO
RO
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RO
Application
Cluster Cache Management (CCM) Feature
RW
Application
RO
Application
Async
Invalidation
& Update
Availability zone 1 Availability zone 3
Availability zone 2
Aurora
Storage
RO
RO
RO
RO
apg_ccm_enabled=on
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RO
Application
Cluster Cache Management (CCM) Feature
RW
Application
RO
Application
Async
Invalidation
& Update
Availability zone 1 Availability zone 3
Availability zone 2
Aurora
Storage
RO
RO
RO
RO
apg_ccm_enabled=on
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RO
Application
Cluster Cache Management (CCM) Feature
RW
Application
RO
Application
Async
Invalidation
& Update
Availability zone 1 Availability zone 3
Availability zone 2
Aurora
Storage
RO
RO
RO
RO
apg_ccm_enabled=on
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RO
Application
Cluster Cache Management (CCM) Feature
RW
Application
RO
Application
Async
Invalidation
& Update
Availability zone 1 Availability zone 3
Availability zone 2
Aurora
Storage
RO
RO
RO
RO
apg_ccm_enabled=on
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Failover time - Cluster Cache Management
0
50,000
100,000
150,000
200,000
250,000
300,000
350,000
400,000
0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200
Transactions
per
Second
(TPS)
Seconds
PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds
Baseline CCM Enabled
340 seconds
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Failover time - Cluster Cache Management
0
50,000
100,000
150,000
200,000
250,000
300,000
350,000
400,000
0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200
Transactions
per
Second
(TPS)
Seconds
PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds
Baseline CCM Enabled
32 seconds
340 seconds
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Standby
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Standby
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Standby
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Standby
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Standby
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pg_prewarm
• Extension available in all supported
versions of PostgreSQL
• Can manually load tables and indexes
into cache
• PostgreSQL 11 introduced auto
prewarm to restore the cache after a
restart or failover
Primary
Availability Zone 1 Availability Zone 2
AWS Region
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Fault Injection
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Fault Injection
• AWS Fault Injection Simulator
• Service API’s/cli
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Fault Injection
• AWS Fault Injection Simulator
• Service API’s/cli
 EC2 - stop-instances
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Fault Injection
• AWS Fault Injection Simulator
• Service API’s/cli
 EC2 - stop-instances
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Fault Injection
• AWS Fault Injection Simulator
• Service API’s/cli
 EC2 - stop-instances
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Standby
Primary
Fault Injection
• AWS Fault Injection Simulator
• Service API’s/cli
 EC2 - stop-instances
 RDS - reboot-instance --force-failover
 Aurora – failover-db-cluster
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Fault Injection
• AWS Fault Injection Simulator
• Service API’s/cli
 EC2 - stop-instances
 RDS - reboot-instance --force-failover
 Aurora – failover-db-cluster
Availability Zone 1 Availability Zone 2
AWS Region
Applications Applications
Standby Primary
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Timeouts
• Timeouts prevent runaway queries
Availability Zone 1 Availability Zone 2
AWS Region Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Timeouts
• Timeouts prevent runaway queries
Availability Zone 1 Availability Zone 2
AWS Region Applications
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Timeouts
• Timeouts prevent runaway queries
• Timeouts can be implemented at any
or all layers in the application stack Availability Zone 1 Availability Zone 2
AWS Region Applications
4 sec
10 sec
30 sec
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Timeouts
• Timeouts prevent runaway queries
• Timeouts can be implemented at any
or all layers in the application stack
• Improperly coordinated timeouts
can cause connection storms
Availability Zone 1 Availability Zone 2
AWS Region Applications
4 sec
10 sec
30 sec
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Timeouts
• Timeouts prevent runaway queries
• Timeouts can be implemented at any
or all layers in the application stack
• Improperly coordinated timeouts
can cause connection storms
• The database statement timeout
needs to be the shortest duration
Availability Zone 1 Availability Zone 2
AWS Region Applications
30 sec
10 sec
4 sec
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Grant McAlister Jim Mlodgenski
Ad

Recommended

AWS DevDay Vienna - Resiliency and availability design patterns for the cloud
AWS DevDay Vienna - Resiliency and availability design patterns for the cloud
Cobus Bernard
 
AWS DevDay Cologne - Resiliency and availability design patterns for the cloud
AWS DevDay Cologne - Resiliency and availability design patterns for the cloud
Cobus Bernard
 
AWS re:Invent 2023 - Deep dive into Amazon Aurora and its innovations DAT408
AWS re:Invent 2023 - Deep dive into Amazon Aurora and its innovations DAT408
Grant McAlister
 
Dat305 Deep Dive on Amazon Aurora PostgreSQL
Dat305 Deep Dive on Amazon Aurora PostgreSQL
Grant McAlister
 
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
Grant McAlister
 
DevConf 2020: Resiliency and availability design patterns for the cloud
DevConf 2020: Resiliency and availability design patterns for the cloud
Cobus Bernard
 
AWS DevDay Berlin - Resiliency and availability design patterns for the cloud
AWS DevDay Berlin - Resiliency and availability design patterns for the cloud
Cobus Bernard
 
"Resiliency and Availability Design Patterns for the Cloud", Sebastien Storma...
"Resiliency and Availability Design Patterns for the Cloud", Sebastien Storma...
Provectus
 
AWS DevDay Berlin 2019 - Going Global With Serverless
AWS DevDay Berlin 2019 - Going Global With Serverless
Darko Mesaroš
 
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
Provectus
 
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
Amazon Web Services Korea
 
DAT402 - Deep Dive on Amazon Aurora PostgreSQL
DAT402 - Deep Dive on Amazon Aurora PostgreSQL
Grant McAlister
 
2021_0825-DAT_Slide-Deck.pdf
2021_0825-DAT_Slide-Deck.pdf
Rais Charipov
 
Amazon (AWS) Aurora
Amazon (AWS) Aurora
PGConf APAC
 
Databases in the Cloud em Amazon Web Services
Databases in the Cloud em Amazon Web Services
Amazon Web Services LATAM
 
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
Insight Technology, Inc.
 
AWS-services.pdf
AWS-services.pdf
K173845ArbazSohailKh
 
AWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdf
Rohini Gaonkar
 
Amazon Aurora (MySQL, Postgres)
Amazon Aurora (MySQL, Postgres)
AWS Germany
 
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
Cobus Bernard
 
Amazon Aurora: Amazon’s New Relational Database Engine
Amazon Aurora: Amazon’s New Relational Database Engine
Danilo Poccia
 
Travel hackathon
Travel hackathon
Vladimir Simek
 
Backup-and-Recovery Procedures decribed in AWS
Backup-and-Recovery Procedures decribed in AWS
Ganesh Bhosale
 
Lesson_02_AWS_Overview of AWS Platform for
Lesson_02_AWS_Overview of AWS Platform for
s2rxxgtzcq
 
Amazon Elasticache and Redis
Amazon Elasticache and Redis
Mikhail Prudnikov
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
클라우드 네이티브 데이터베이스 서비스로 Oracle RAC 전환 - 김지훈 :: AWS 클라우드 마이그레이션 온라인
클라우드 네이티브 데이터베이스 서비스로 Oracle RAC 전환 - 김지훈 :: AWS 클라우드 마이그레이션 온라인
Amazon Web Services Korea
 
Avoiding Cloud Outage
Avoiding Cloud Outage
Nati Shalom
 
Practical Memory Tuning for PostgreSQL
Practical Memory Tuning for PostgreSQL
Grant McAlister
 
Full Page Writes in PostgreSQL PGCONFEU 2022
Full Page Writes in PostgreSQL PGCONFEU 2022
Grant McAlister
 

More Related Content

Similar to re:Invent 2022 DAT316 Build resilient applications using Amazon RDS and Aurora PostgreSQL (20)

AWS DevDay Berlin 2019 - Going Global With Serverless
AWS DevDay Berlin 2019 - Going Global With Serverless
Darko Mesaroš
 
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
Provectus
 
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
Amazon Web Services Korea
 
DAT402 - Deep Dive on Amazon Aurora PostgreSQL
DAT402 - Deep Dive on Amazon Aurora PostgreSQL
Grant McAlister
 
2021_0825-DAT_Slide-Deck.pdf
2021_0825-DAT_Slide-Deck.pdf
Rais Charipov
 
Amazon (AWS) Aurora
Amazon (AWS) Aurora
PGConf APAC
 
Databases in the Cloud em Amazon Web Services
Databases in the Cloud em Amazon Web Services
Amazon Web Services LATAM
 
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
Insight Technology, Inc.
 
AWS-services.pdf
AWS-services.pdf
K173845ArbazSohailKh
 
AWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdf
Rohini Gaonkar
 
Amazon Aurora (MySQL, Postgres)
Amazon Aurora (MySQL, Postgres)
AWS Germany
 
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
Cobus Bernard
 
Amazon Aurora: Amazon’s New Relational Database Engine
Amazon Aurora: Amazon’s New Relational Database Engine
Danilo Poccia
 
Travel hackathon
Travel hackathon
Vladimir Simek
 
Backup-and-Recovery Procedures decribed in AWS
Backup-and-Recovery Procedures decribed in AWS
Ganesh Bhosale
 
Lesson_02_AWS_Overview of AWS Platform for
Lesson_02_AWS_Overview of AWS Platform for
s2rxxgtzcq
 
Amazon Elasticache and Redis
Amazon Elasticache and Redis
Mikhail Prudnikov
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
클라우드 네이티브 데이터베이스 서비스로 Oracle RAC 전환 - 김지훈 :: AWS 클라우드 마이그레이션 온라인
클라우드 네이티브 데이터베이스 서비스로 Oracle RAC 전환 - 김지훈 :: AWS 클라우드 마이그레이션 온라인
Amazon Web Services Korea
 
Avoiding Cloud Outage
Avoiding Cloud Outage
Nati Shalom
 
AWS DevDay Berlin 2019 - Going Global With Serverless
AWS DevDay Berlin 2019 - Going Global With Serverless
Darko Mesaroš
 
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
Provectus
 
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
Amazon Web Services Korea
 
DAT402 - Deep Dive on Amazon Aurora PostgreSQL
DAT402 - Deep Dive on Amazon Aurora PostgreSQL
Grant McAlister
 
2021_0825-DAT_Slide-Deck.pdf
2021_0825-DAT_Slide-Deck.pdf
Rais Charipov
 
Amazon (AWS) Aurora
Amazon (AWS) Aurora
PGConf APAC
 
Databases in the Cloud em Amazon Web Services
Databases in the Cloud em Amazon Web Services
Amazon Web Services LATAM
 
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
Insight Technology, Inc.
 
AWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdf
Rohini Gaonkar
 
Amazon Aurora (MySQL, Postgres)
Amazon Aurora (MySQL, Postgres)
AWS Germany
 
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
Cobus Bernard
 
Amazon Aurora: Amazon’s New Relational Database Engine
Amazon Aurora: Amazon’s New Relational Database Engine
Danilo Poccia
 
Backup-and-Recovery Procedures decribed in AWS
Backup-and-Recovery Procedures decribed in AWS
Ganesh Bhosale
 
Lesson_02_AWS_Overview of AWS Platform for
Lesson_02_AWS_Overview of AWS Platform for
s2rxxgtzcq
 
Amazon Elasticache and Redis
Amazon Elasticache and Redis
Mikhail Prudnikov
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
클라우드 네이티브 데이터베이스 서비스로 Oracle RAC 전환 - 김지훈 :: AWS 클라우드 마이그레이션 온라인
클라우드 네이티브 데이터베이스 서비스로 Oracle RAC 전환 - 김지훈 :: AWS 클라우드 마이그레이션 온라인
Amazon Web Services Korea
 
Avoiding Cloud Outage
Avoiding Cloud Outage
Nati Shalom
 

More from Grant McAlister (10)

Practical Memory Tuning for PostgreSQL
Practical Memory Tuning for PostgreSQL
Grant McAlister
 
Full Page Writes in PostgreSQL PGCONFEU 2022
Full Page Writes in PostgreSQL PGCONFEU 2022
Grant McAlister
 
re:Invent 2020 DAT301 Deep Dive on Amazon Aurora with PostgreSQL Compatibility
re:Invent 2020 DAT301 Deep Dive on Amazon Aurora with PostgreSQL Compatibility
Grant McAlister
 
AWS re:Invent 2019 - DAT328 Deep Dive on Amazon Aurora PostgreSQL
AWS re:Invent 2019 - DAT328 Deep Dive on Amazon Aurora PostgreSQL
Grant McAlister
 
HOT Understanding this important update optimization
HOT Understanding this important update optimization
Grant McAlister
 
Deep dive into the Rds PostgreSQL Universe Austin 2017
Deep dive into the Rds PostgreSQL Universe Austin 2017
Grant McAlister
 
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
Grant McAlister
 
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Grant McAlister
 
Amazon RDS for PostgreSQL - Postgres Open 2016 - New Features and Lessons Lea...
Amazon RDS for PostgreSQL - Postgres Open 2016 - New Features and Lessons Lea...
Grant McAlister
 
Amazon RDS for PostgreSQL - PGConf 2016
Amazon RDS for PostgreSQL - PGConf 2016
Grant McAlister
 
Practical Memory Tuning for PostgreSQL
Practical Memory Tuning for PostgreSQL
Grant McAlister
 
Full Page Writes in PostgreSQL PGCONFEU 2022
Full Page Writes in PostgreSQL PGCONFEU 2022
Grant McAlister
 
re:Invent 2020 DAT301 Deep Dive on Amazon Aurora with PostgreSQL Compatibility
re:Invent 2020 DAT301 Deep Dive on Amazon Aurora with PostgreSQL Compatibility
Grant McAlister
 
AWS re:Invent 2019 - DAT328 Deep Dive on Amazon Aurora PostgreSQL
AWS re:Invent 2019 - DAT328 Deep Dive on Amazon Aurora PostgreSQL
Grant McAlister
 
HOT Understanding this important update optimization
HOT Understanding this important update optimization
Grant McAlister
 
Deep dive into the Rds PostgreSQL Universe Austin 2017
Deep dive into the Rds PostgreSQL Universe Austin 2017
Grant McAlister
 
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
Grant McAlister
 
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Grant McAlister
 
Amazon RDS for PostgreSQL - Postgres Open 2016 - New Features and Lessons Lea...
Amazon RDS for PostgreSQL - Postgres Open 2016 - New Features and Lessons Lea...
Grant McAlister
 
Amazon RDS for PostgreSQL - PGConf 2016
Amazon RDS for PostgreSQL - PGConf 2016
Grant McAlister
 
Ad

Recently uploaded (20)

Starbucks in the Indian market through its joint venture.
Starbucks in the Indian market through its joint venture.
sales480687
 
定制OCAD学生卡加拿大安大略艺术与设计大学成绩单范本,OCAD成绩单复刻
定制OCAD学生卡加拿大安大略艺术与设计大学成绩单范本,OCAD成绩单复刻
taqyed
 
ilide.info-tg-understanding-culture-society-and-politics-pr_127f984d2904c57ec...
ilide.info-tg-understanding-culture-society-and-politics-pr_127f984d2904c57ec...
jed P
 
Shifting Focus on AI: How it Can Make a Positive Difference
Shifting Focus on AI: How it Can Make a Positive Difference
1508 A/S
 
25 items quiz for practical research 1 in grade 11
25 items quiz for practical research 1 in grade 11
leamaydayaganon81
 
11_L2_Defects_and_Trouble_Shooting_2014[1].pdf
11_L2_Defects_and_Trouble_Shooting_2014[1].pdf
gun3awan88
 
Measurecamp Copenhagen - Consent Context
Measurecamp Copenhagen - Consent Context
Human37
 
英国毕业证范本利物浦约翰摩尔斯大学成绩单底纹防伪LJMU学生证办理学历认证
英国毕业证范本利物浦约翰摩尔斯大学成绩单底纹防伪LJMU学生证办理学历认证
taqyed
 
All the DataOps, all the paradigms .
All the DataOps, all the paradigms .
Lars Albertsson
 
624753984-Annex-A3-RPMS-Tool-for-Proficient-Teachers-SY-2024-2025.pdf
624753984-Annex-A3-RPMS-Tool-for-Proficient-Teachers-SY-2024-2025.pdf
CristineGraceAcuyan
 
RESEARCH-FINAL-GROUP-3, about the final .pptx
RESEARCH-FINAL-GROUP-3, about the final .pptx
gwapokoha1
 
Artigo - Playing to Win.planejamento docx
Artigo - Playing to Win.planejamento docx
KellyXavier15
 
Boost Business Efficiency with Professional Data Entry Services
Boost Business Efficiency with Professional Data Entry Services
eloiacs eloiacs
 
最新版美国芝加哥大学毕业证(UChicago毕业证书)原版定制
最新版美国芝加哥大学毕业证(UChicago毕业证书)原版定制
taqyea
 
@Reset-Password.pptx presentakh;kenvtion
@Reset-Password.pptx presentakh;kenvtion
MarkLariosa1
 
NASA ESE Study Results v4 05.29.2020.pptx
NASA ESE Study Results v4 05.29.2020.pptx
CiroAlejandroCamacho
 
PPT2 W1L2.pptx.........................................
PPT2 W1L2.pptx.........................................
palicteronalyn26
 
Allotted-MBBS-Student-list-batch-2021.pdf
Allotted-MBBS-Student-list-batch-2021.pdf
subhansaifi0603
 
Crafting-Research-Recommendations Grade 12.pptx
Crafting-Research-Recommendations Grade 12.pptx
DaryllWhere
 
Microsoft Power BI - Advanced Certificate for Business Intelligence using Pow...
Microsoft Power BI - Advanced Certificate for Business Intelligence using Pow...
Prasenjit Debnath
 
Starbucks in the Indian market through its joint venture.
Starbucks in the Indian market through its joint venture.
sales480687
 
定制OCAD学生卡加拿大安大略艺术与设计大学成绩单范本,OCAD成绩单复刻
定制OCAD学生卡加拿大安大略艺术与设计大学成绩单范本,OCAD成绩单复刻
taqyed
 
ilide.info-tg-understanding-culture-society-and-politics-pr_127f984d2904c57ec...
ilide.info-tg-understanding-culture-society-and-politics-pr_127f984d2904c57ec...
jed P
 
Shifting Focus on AI: How it Can Make a Positive Difference
Shifting Focus on AI: How it Can Make a Positive Difference
1508 A/S
 
25 items quiz for practical research 1 in grade 11
25 items quiz for practical research 1 in grade 11
leamaydayaganon81
 
11_L2_Defects_and_Trouble_Shooting_2014[1].pdf
11_L2_Defects_and_Trouble_Shooting_2014[1].pdf
gun3awan88
 
Measurecamp Copenhagen - Consent Context
Measurecamp Copenhagen - Consent Context
Human37
 
英国毕业证范本利物浦约翰摩尔斯大学成绩单底纹防伪LJMU学生证办理学历认证
英国毕业证范本利物浦约翰摩尔斯大学成绩单底纹防伪LJMU学生证办理学历认证
taqyed
 
All the DataOps, all the paradigms .
All the DataOps, all the paradigms .
Lars Albertsson
 
624753984-Annex-A3-RPMS-Tool-for-Proficient-Teachers-SY-2024-2025.pdf
624753984-Annex-A3-RPMS-Tool-for-Proficient-Teachers-SY-2024-2025.pdf
CristineGraceAcuyan
 
RESEARCH-FINAL-GROUP-3, about the final .pptx
RESEARCH-FINAL-GROUP-3, about the final .pptx
gwapokoha1
 
Artigo - Playing to Win.planejamento docx
Artigo - Playing to Win.planejamento docx
KellyXavier15
 
Boost Business Efficiency with Professional Data Entry Services
Boost Business Efficiency with Professional Data Entry Services
eloiacs eloiacs
 
最新版美国芝加哥大学毕业证(UChicago毕业证书)原版定制
最新版美国芝加哥大学毕业证(UChicago毕业证书)原版定制
taqyea
 
@Reset-Password.pptx presentakh;kenvtion
@Reset-Password.pptx presentakh;kenvtion
MarkLariosa1
 
NASA ESE Study Results v4 05.29.2020.pptx
NASA ESE Study Results v4 05.29.2020.pptx
CiroAlejandroCamacho
 
PPT2 W1L2.pptx.........................................
PPT2 W1L2.pptx.........................................
palicteronalyn26
 
Allotted-MBBS-Student-list-batch-2021.pdf
Allotted-MBBS-Student-list-batch-2021.pdf
subhansaifi0603
 
Crafting-Research-Recommendations Grade 12.pptx
Crafting-Research-Recommendations Grade 12.pptx
DaryllWhere
 
Microsoft Power BI - Advanced Certificate for Business Intelligence using Pow...
Microsoft Power BI - Advanced Certificate for Business Intelligence using Pow...
Prasenjit Debnath
 
Ad

re:Invent 2022 DAT316 Build resilient applications using Amazon RDS and Aurora PostgreSQL

  • 1. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 2. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Build resilient applications using Amazon RDS and Aurora PostgreSQL D A T 3 1 6 Grant McAlister Senior Principal Engineer Amazon Web Services Jim Mlodgenski Principal Database Engineer Amazon Web Services
  • 3. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 4. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 5. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 6. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 7. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 8. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 9. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point • Planned and unplanned Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 10. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Primary The case for resiliency • Everything fails at some point • Planned and unplanned Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 11. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary The case for resiliency • Everything fails at some point • Planned and unplanned Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 12. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary The case for resiliency • Everything fails at some point • Planned and unplanned • Does the system operate as designed Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 13. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. The case for resiliency • Everything fails at some point • Planned and unplanned • Does the system operate as designed Availability Zone 1 Availability Zone 2 AWS Region Applications Applications Standby Primary
  • 14. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. The case for resiliency • Everything fails at some point • Planned and unplanned • Does the system operate as designed Availability Zone 1 Availability Zone 2 AWS Region Applications Applications Standby Primary
  • 15. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. The case for resiliency • Everything fails at some point • Planned and unplanned • Does the system operate as designed Availability Zone 1 Availability Zone 2 AWS Region Applications Applications Standby Primary
  • 16. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. The case for resiliency • Everything fails at some point • Planned and unplanned • Does the system operate as designed • Grey failures Availability Zone 1 Availability Zone 2 AWS Region Applications Applications Standby Primary
  • 17. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications
  • 18. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s 1 2 3 4 5 6
  • 19. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system 1 2 3 4 5 6
  • 20. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 writer reader reader
  • 21. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 writer reader reader
  • 22. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 reader
  • 23. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 reader writer
  • 24. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 reader writer
  • 25. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 reader writer
  • 26. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ 1 2 3 4 5 6 reader writer
  • 27. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ • AWS JDBC driver for faster failover 1 2 3 4 5 6 reader AWS JDBC writer
  • 28. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora with PostgreSQL compatibility Availability Zone 1 AWS Region Applications Availability Zone 2 Availability Zone 3 Aurora Storage Applications Applications • 4 of 6 write quorum across 3 AZ’s • Self repairing storage system • One or more db instances per AZ • AWS JDBC driver for faster failover 1 2 3 4 5 6 reader AWS JDBC writer
  • 29. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Amazon RDS Multi-AZ with two readable standbys • PostgreSQL replication across 3 AZ’s with a 2 of 3 quorum • Write Ahead Log written to local storage • Failover time a factor of transaction apply lag Availability Zone 3 AWS Region Applications Availability Zone 1 Primary Availability Zone 2 Standby WAL WAL WAL
  • 30. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Amazon RDS Multi-AZ with one standby • PostgreSQL community version with easy configuration and management • High availability across two availability zones • All writes synchronously replicated to the standby • Failover a factor of checkpoints Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 31. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Recovery Time 3 GiB Redo Recovered in 19 seconds 10 GiB Redo Recovered in 50 seconds 30 GiB Redo Recovered in 123 seconds 0 20 40 60 80 100 120 140 160 0 20,000 40,000 60,000 80,000 100,000 120,000 140,000 Recovery Time in Seconds (less is better) Writes / Second (more is better) RECOVERY TIME FROM CRASH UNDER LOAD Bubble size represents redo log, which must be recovered As PostgreSQL throughput goes up, so does log size and crash recovery time
  • 32. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Recovery Time 3 GiB Redo Recovered in 19 seconds 10 GiB Redo Recovered in 50 seconds 30 GiB Redo Recovered in 123 seconds 0 20 40 60 80 100 120 140 160 0 20,000 40,000 60,000 80,000 100,000 120,000 140,000 Recovery Time in Seconds (less is better) Writes / Second (more is better) RECOVERY TIME FROM CRASH UNDER LOAD Bubble size represents redo log, which must be recovered As PostgreSQL throughput goes up, so does log size and crash recovery time Amazon Aurora has no redo. Recovered in 3 seconds while maintaining greater throughput.
  • 33. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Failover time 0 50,000 100,000 150,000 200,000 250,000 300,000 350,000 400,000 0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200 Transactions per Second (TPS) Seconds PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds Baseline 32 seconds
  • 34. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Failover time 0 50,000 100,000 150,000 200,000 250,000 300,000 350,000 400,000 0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200 Transactions per Second (TPS) Seconds PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds Baseline 340 seconds
  • 35. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. RO Application Cluster Cache Management (CCM) Feature RW Application RO Application Async Invalidation & Update Availability zone 1 Availability zone 3 Availability zone 2 Aurora Storage RO RO RO RO
  • 36. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. RO Application Cluster Cache Management (CCM) Feature RW Application RO Application Async Invalidation & Update Availability zone 1 Availability zone 3 Availability zone 2 Aurora Storage RO RO RO RO apg_ccm_enabled=on
  • 37. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. RO Application Cluster Cache Management (CCM) Feature RW Application RO Application Async Invalidation & Update Availability zone 1 Availability zone 3 Availability zone 2 Aurora Storage RO RO RO RO apg_ccm_enabled=on
  • 38. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. RO Application Cluster Cache Management (CCM) Feature RW Application RO Application Async Invalidation & Update Availability zone 1 Availability zone 3 Availability zone 2 Aurora Storage RO RO RO RO apg_ccm_enabled=on
  • 39. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. RO Application Cluster Cache Management (CCM) Feature RW Application RO Application Async Invalidation & Update Availability zone 1 Availability zone 3 Availability zone 2 Aurora Storage RO RO RO RO apg_ccm_enabled=on
  • 40. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Failover time - Cluster Cache Management 0 50,000 100,000 150,000 200,000 250,000 300,000 350,000 400,000 0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200 Transactions per Second (TPS) Seconds PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds Baseline CCM Enabled 340 seconds
  • 41. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Failover time - Cluster Cache Management 0 50,000 100,000 150,000 200,000 250,000 300,000 350,000 400,000 0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200 Transactions per Second (TPS) Seconds PGBench 20X RO / 1X RW 160GB Cached - Failover at 600 Seconds Baseline CCM Enabled 32 seconds 340 seconds
  • 42. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Standby Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 43. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Standby Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 44. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Standby Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 45. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Standby Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 46. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Standby Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 47. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 48. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pg_prewarm • Extension available in all supported versions of PostgreSQL • Can manually load tables and indexes into cache • PostgreSQL 11 introduced auto prewarm to restore the cache after a restart or failover Primary Availability Zone 1 Availability Zone 2 AWS Region
  • 49. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Fault Injection Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 50. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Fault Injection • AWS Fault Injection Simulator • Service API’s/cli Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 51. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Fault Injection • AWS Fault Injection Simulator • Service API’s/cli  EC2 - stop-instances Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 52. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Fault Injection • AWS Fault Injection Simulator • Service API’s/cli  EC2 - stop-instances Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 53. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Fault Injection • AWS Fault Injection Simulator • Service API’s/cli  EC2 - stop-instances Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 54. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Standby Primary Fault Injection • AWS Fault Injection Simulator • Service API’s/cli  EC2 - stop-instances  RDS - reboot-instance --force-failover  Aurora – failover-db-cluster Availability Zone 1 Availability Zone 2 AWS Region Applications Applications
  • 55. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Fault Injection • AWS Fault Injection Simulator • Service API’s/cli  EC2 - stop-instances  RDS - reboot-instance --force-failover  Aurora – failover-db-cluster Availability Zone 1 Availability Zone 2 AWS Region Applications Applications Standby Primary
  • 56. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Timeouts • Timeouts prevent runaway queries Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 57. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Timeouts • Timeouts prevent runaway queries Availability Zone 1 Availability Zone 2 AWS Region Applications
  • 58. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Timeouts • Timeouts prevent runaway queries • Timeouts can be implemented at any or all layers in the application stack Availability Zone 1 Availability Zone 2 AWS Region Applications 4 sec 10 sec 30 sec
  • 59. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Timeouts • Timeouts prevent runaway queries • Timeouts can be implemented at any or all layers in the application stack • Improperly coordinated timeouts can cause connection storms Availability Zone 1 Availability Zone 2 AWS Region Applications 4 sec 10 sec 30 sec
  • 60. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Timeouts • Timeouts prevent runaway queries • Timeouts can be implemented at any or all layers in the application stack • Improperly coordinated timeouts can cause connection storms • The database statement timeout needs to be the shortest duration Availability Zone 1 Availability Zone 2 AWS Region Applications 30 sec 10 sec 4 sec
  • 61. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Grant McAlister Jim Mlodgenski