Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Concevoir une architecture mondiale et redondan...

Concevoir une architecture mondiale et redondante sur plusieurs régions. (slides in English)

Concevoir une architecture mondiale et redondante sur plusieurs régions.
 
Vous déployez souvent des applications pour les rendre disponibles à vos clients partout dans le monde en déployant vos services sur plusieurs régions? Ces projets complexes nécessitaient souvent des mois d’ingénierie, mais le serverless a changé le jeu ! Cette présentation vous aidera à comprendre comment créer des applications serverless multi-régions et actif-actif. Découvrez les avantages et les inconvénients du routage DNS par rapport à Anycast IP et apprenez comment exploiter des services serverless tels que Route 53, Global Accelerator, API Gateway, l'Application Load Balancer, AWS Lambda et DynamoDB.

Adrian Hornsby

April 02, 2019
Tweet

More Decks by Adrian Hornsby

Other Decks in Programming

Transcript

  1. © 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
  2. © 2019, Amazon Web Services, Inc. or its affiliates. All

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

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

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

    rights reserved. S U M M I T And Now … Origin ~300ms
  6. © 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
  7. © 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!
  8. © 2019, Amazon Web Services, Inc. or its affiliates. All

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

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

    rights reserved. S U M M I T Origin Cross region VPC peering Origin
  11. © 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
  12. © 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
  13. S U M M I T © 2019, Amazon Web

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

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

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

    rights reserved. S U M M I T Latency based routing Region Region Application Application
  17. © 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
  18. © 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
  19. © 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
  20. © 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
  21. © 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
  22. © 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
  23. © 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
  24. © 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
  25. © 2019, Amazon Web Services, Inc. or its affiliates. All

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

    rights reserved. S U M M I T Health checks with Route 53
  27. © 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à!
  28. S U M M I T © 2019, Amazon Web

    Services, Inc. or its affiliates. All rights reserved. Setup with
  29. © 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
  30. © 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
  31. © 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
  32. © 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); }
  33. S U M M I T © 2019, Amazon Web

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

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

    rights reserved. S U M M I T #awssummit
  36. © 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
  37. © 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
  38. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T #awssummit Multi-region Setup
  39. © 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.
  40. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. S U M M I T #awssummit Reduce latency for global teams
  41. S U M M I T © 2019, Amazon Web

    Services, Inc. or its affiliates. All rights reserved. Lambda @ Edge
  42. © 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
  43. © 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
  44. S U M M I T © 2019, Amazon Web

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

    rights reserved. S U M M I T AWS Global Accelerator
  46. © 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
  47. © 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
  48. © 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
  49. © 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
  50. © 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à!
  51. S U M M I T © 2019, Amazon Web

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

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

    rights reserved. S U M M I T https://medium.com/@adhorn
  54. Thank you! S U M M I T © 2019,

    Amazon Web Services, Inc. or its affiliates. All rights reserved. Adrian Hornsby