Slide 1

Slide 1 text

S U M M I T P a ri s

Slide 2

Slide 2 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Concevoir une architecture mondiale et redondante sur plusieurs régions. Adrian Hornsby Sr. Technical Evangelist Amazon Web Services Joris Andrade Software Engineer FrontApp @Zambka N E T 3 0 2

Slide 3

Slide 3 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Why build a multi-region architecture?

Slide 4

Slide 4 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Once upon a time … Origin

Slide 5

Slide 5 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T And Now … Origin

Slide 6

Slide 6 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T And Now … Origin ~300ms

Slide 7

Slide 7 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Improve availability and disaster recovery Applications in US West Applications in US East Users from San Francisco Users from New York Service 1 Service 2 Service 3 Service 4 Service 1 Service 2 Service 3 Service 4

Slide 8

Slide 8 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Serverless cost model is a huge advantage here!

Slide 9

Slide 9 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Active-Active | Active-Passive | What to do?

Slide 10

Slide 10 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Amazon Global Network

Slide 11

Slide 11 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Origin Cross region VPC peering Origin

Slide 12

Slide 12 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Amazon S3 cross-region replication Bucket with objects Bucket with objects

Slide 13

Slide 13 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Build high performance, globally distributed applications Low latency reads & writes to locally available tables Disaster proof with multi-region redundancy Easy to set up and no application rewrites required Globally dispersed users Replica (N. America) Replica (Europe) Replica (Asia) Global App Global Table Amazon DynamoDB Global Tables Fully managed, multi-master, multi-region database

Slide 14

Slide 14 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 15

Slide 15 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Setup

Slide 16

Slide 16 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Multi-region with Route 53

Slide 17

Slide 17 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Latency based routing Region Region Application Application

Slide 18

Slide 18 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Geo-based routing Region us-east-1 Region us-west-2 Application Application

Slide 19

Slide 19 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Weighted round robin routing Region us-east-1 Region us-west-2 Application Application

Slide 20

Slide 20 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T DNS failover Region us-east-1 Region us-west-2 Application Application

Slide 21

Slide 21 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region us-east-1 Region us-west-2 Global Table https://global.adhorn.me

Slide 22

Slide 22 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region us-east-1 Region us-west-2 Global Table

Slide 23

Slide 23 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region us-east-1 Region us-west-2 Global Table

Slide 24

Slide 24 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 25

Slide 25 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region us-east-1 Region us-west-2 https://globalddb.adhorn.me Regional API Endpoint Custom Domain Name Regional API Endpoint Custom Domain Name API Gateway

Slide 26

Slide 26 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region us-east-1 Region us-west-2 Global Table

Slide 27

Slide 27 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Route53: Traffic Policy

Slide 28

Slide 28 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Health checks with Route 53

Slide 29

Slide 29 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region us-east-1 Region us-west-2 Global Table https://globalddb.adhorn.me Voilà!

Slide 30

Slide 30 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Setup with

Slide 31

Slide 31 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Amazon CloudFront AWS Lambda Lambda@Edge Lambda@Edge

Slide 32

Slide 32 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Lambda@Edge Events CloudFront cache Viewer Response Origin Response Origin Origin Request Viewer Viewer Request

Slide 33

Slide 33 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Write Once, Run Lambda Functions Globally N Virginia AWS Location AWS Location AWS Location AWS Location AWS Location AWS Location

Slide 34

Slide 34 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Lambda@Edge Programming Model exports.handler = (event, context, callback) => { /* viewer-request and origin-request events * have the request as input */ const request = event.Records[0].cf.request; /* viewer-response and origin-response events * have the response as input */ const response = event.Records[0].cf.response; /* Do the processing – say add a header */ /* When I am done I let CloudFront what to do next */ callback(null, request); }

Slide 35

Slide 35 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 36

Slide 36 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Joris Andrade Software Engineer FrontApp @Zambka

Slide 37

Slide 37 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit

Slide 38

Slide 38 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Move to AWS Managed Services Infra as Code 1st Infra engineer Multi- region Horizontal sharding Kubernete s Lambda @Edge

Slide 39

Slide 39 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Multi-region setup • Data from a customer in only 1 region • US-West-1 ! / EU-West-1 " • Dynamic routing with DynamoDB • VPC Peering

Slide 40

Slide 40 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Multi-region Setup

Slide 41

Slide 41 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit High Latency for global teams Customers with global teams experience very high latencies when their API traffic is routed to their “home” region through a different intermediate region.

Slide 42

Slide 42 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Reduce latency for global teams

Slide 43

Slide 43 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lambda @ Edge

Slide 44

Slide 44 text

Live Demo

Slide 45

Slide 45 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Takeaways Great impact for our global customers : up to 50% latency reduction ! 0 0.5 1 1.5 2 2.5 AVG P50 P95 P99

Slide 46

Slide 46 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T #awssummit Takeaways Easy to scale: around 300 run / s at peak time Complex to deploy, test and monitor

Slide 47

Slide 47 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Setup

Slide 48

Slide 48 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T AWS Global Accelerator

Slide 49

Slide 49 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 50

Slide 50 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region eu-central-1 Region eu-west-2 Global Table 2x Anycast IPs Global Accelerator

Slide 51

Slide 51 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region eu-central-1 Region eu-west-2 Global Table

Slide 52

Slide 52 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 53

Slide 53 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region eu-central-1 Region eu-west-2 Global Table

Slide 54

Slide 54 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 55

Slide 55 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 56

Slide 56 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 57

Slide 57 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region eu-central-1 Region eu-west-2 Global Table

Slide 58

Slide 58 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 59

Slide 59 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 60

Slide 60 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 61

Slide 61 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 62

Slide 62 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T

Slide 63

Slide 63 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T Region eu-central-1 Region eu-west-2 Global Table 2x Anycast IPs Global Accelerator Voilà!

Slide 64

Slide 64 text

S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Slide 65

Slide 65 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T DNS Issues

Slide 66

Slide 66 text

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. S U M M I T https://medium.com/@adhorn

Slide 67

Slide 67 text

Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Adrian Hornsby