best practices for building multi-region, active-

52

Upload: others

Post on 23-Jun-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Best practices for building multi-region, active-
Page 2: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Best practices for building multi-region, active-active serverless applications

S V S 3 3 7 - R

Adrian Hornsby

Principal Evangelist

Amazon Web Services

Page 3: Best practices for building multi-region, active-

Why build a global architecture?

Page 4: Best practices for building multi-region, active-

Once upon a time …

Origin

Page 5: Best practices for building multi-region, active-

And now . . .

Origin

~300 ms

Page 6: Best practices for building multi-region, active-

Origin

Improve latency for end users

Origin

Page 7: Best practices for building multi-region, active-

Improve availability and disaster recovery

Applications in

US West

Applications in

US East

Users from

San FranciscoUsers from

New York

Service 1

Service 2

Service 3

Service 4

Service 1

Service 2

Service 3

Service 4

Page 8: Best practices for building multi-region, active-

Amazon global network

Page 9: Best practices for building multi-region, active-

Origin

Cross-region VPC peering

Origin

Page 10: Best practices for building multi-region, active-

Amazon S3 cross-region replication

Bucket with

objects

Bucket with

objects

Page 11: Best practices for building multi-region, active-

Amazon DynamoDB global table

Page 12: Best practices for building multi-region, active-

https://aws.amazon.com/blogs/aws/new-convert-your-single-region-amazon-dynamodb-tables-to-global-tables/

Page 13: Best practices for building multi-region, active-

Active-Active | Active-Passive | What to do?

Page 14: Best practices for building multi-region, active-

Serverless cost model is a huge advantage here!

Page 15: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 16: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Route 53 > Amazon API Gateway >AWS Lambda > Amazon DynamoDB

Page 17: Best practices for building multi-region, active-

Global Table

https://global.adhorn.me

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

Amazon API Gateway

Amazon API Gateway

Amazon Route 53

Region

Region us-east-1

Region

Region us-west-2

Page 18: Best practices for building multi-region, active-

Multi-region with Route 53 Amazon Route 53

Page 19: Best practices for building multi-region, active-

Latency-based routing

Application Application

Amazon Route 53

Region Region

Page 20: Best practices for building multi-region, active-

Geo-based routing

Application Application

Amazon Route 53

Region Region

Page 21: Best practices for building multi-region, active-

Weighted round-robin routing

Application Application

Amazon Route 53

Region Region

Page 22: Best practices for building multi-region, active-

DNS failover

Application Application

Region Region

Amazon Route 53

Page 23: Best practices for building multi-region, active-

Global Table

Amazon DynamoDB

Amazon DynamoDB

Region

Region

Region us-east-1

Region us-west-2

Page 24: Best practices for building multi-region, active-

Global Table

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

Region

Region

Region us-east-1

Region us-west-2

Page 25: Best practices for building multi-region, active-
Page 26: Best practices for building multi-region, active-

https://globalddb.adhorn.me

Regional

API

Endpoint

Custom

Domain

Name

Regional

API

Endpoint

Custom

Domain

Name

API Gateway

Amazon API Gateway

Amazon API Gateway

AWS Lambda

AWS Lambda

Amazon Route 53

Region

Region

Page 27: Best practices for building multi-region, active-

Route 53: Traffic policy

Page 28: Best practices for building multi-region, active-

Health checks with Route 53

Page 29: Best practices for building multi-region, active-

Global Table

https://global.adhorn.me

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

Amazon API Gateway

Amazon API Gateway

Amazon Route 53

Region

Region us-east-1

Region

Region us-west-2

Voilà!

Page 30: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Global Accelerator > Application Load Balancer > Lambda > DynamoDB

Page 31: Best practices for building multi-region, active-

Global Table

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

AWS Global Accelerator

Application Load Balancer

Application Load Balancer

Region

Region eu-central-1

Region

Region us-west-2

Page 32: Best practices for building multi-region, active-

AWS Global Accelerator

Page 33: Best practices for building multi-region, active-
Page 34: Best practices for building multi-region, active-

Global Table

Amazon DynamoDB

Amazon DynamoDB

Region

Region eu-central-1

Region

Region us-west-2

Page 35: Best practices for building multi-region, active-
Page 36: Best practices for building multi-region, active-

Global Table

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

Region

Region eu-central-1

Region

Region us-west-2

Page 37: Best practices for building multi-region, active-
Page 38: Best practices for building multi-region, active-
Page 39: Best practices for building multi-region, active-
Page 40: Best practices for building multi-region, active-

Global Table

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

Application Load Balancer

Application Load Balancer

Region

Region eu-central-1

Region

Region us-west-2

Page 41: Best practices for building multi-region, active-
Page 42: Best practices for building multi-region, active-
Page 43: Best practices for building multi-region, active-
Page 44: Best practices for building multi-region, active-
Page 45: Best practices for building multi-region, active-
Page 46: Best practices for building multi-region, active-

Global Table

AWS Lambda

AWS Lambda

Amazon DynamoDB

Amazon DynamoDB

AWS Global Accelerator

Application Load Balancer

Application Load Balancer

Voilà!Region

Region eu-central-1

Region

Region us-west-2

Page 47: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 48: Best practices for building multi-region, active-
Page 49: Best practices for building multi-region, active-

https://medium.com/@adhorn

Page 50: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Free, on-demand courses on serverless, including Deep Dive: Lambda@Edge and Deep Dive on AWS Fargate

Visit the Learning Library at https://aws.training

Additional digital and classroom trainings cover modern application development and computing

Learn serverless with AWS Training and CertificationResources created by the experts at AWS to help you learn modern application development

Page 51: Best practices for building multi-region, active-

Thank you!

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Adrian Hornsby

[email protected]

Page 52: Best practices for building multi-region, active-

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.