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

How to Build a Regionally Distributed Serverles...

How to Build a Regionally Distributed Serverless Architecture

Serverless is being billed as the future of cloud computing. Widely embraced by developers to offload most of the heavy-lifting infrastructure management, serverless is also gaining ground in the enterprise.

In this webinar, Alex Casalboni, Senior Software Engineer at Cloud Academy and Rupak Ganguly, Enterprise Solutions Architect at Serverless Inc. will explore the architectural advantages of globally distributed serverless applications through a live demo.

Alex Casalboni

January 30, 2018
Tweet

More Decks by Alex Casalboni

Other Decks in Technology

Transcript

  1. About us Alex Casalboni @alex_casalboni Rupak Ganguly Enterprise Solu.ons Architect

    @ Serverless Inc. @rupakg Sr. So6ware Engineer @ Cloud Academy Inc. clda.co/sls-mul,-region
  2. Agenda Serverless Web APIs Why going mul,-region? Live Demo Gotchas

    and Challenges Cost Analysis clda.co/sls-mul,-region
  3. Edge-Op,mized API Endpoints It was the default un,l Nov 2017

    clda.co/sls-mul,-region Managed CloudFront distribu-on Already “global”, but…
  4. Mul,-region architectures on AWS 15+ AWS regions (and coun,ng!) clda.co/sls-mul,-region

    Independent and redundant components Increased availability and reliability
  5. Serverless cross-region failover High Availability (Ac-ve-Ac-ve setup) clda.co/sls-mul,-region Regional fallback

    in case of large-scale disasters Improved overall Latency Latency-based rou-ng & Health Checks
  6. Handling persistent data replica,on Amazon DynamoDB Global Tables (NoSQL) clda.co/sls-mul,-region

    Mul--region & Mul--master setup Automa,c data replica-on across regions (via streams) No code changes or app rewrite
  7. Sample app (Stack) clda.co/sls-mul,-region Serverless Framework (v1.25.0) Two Lambda Func,ons,

    one DynamoDB Table Three AWS Regions (Frankfurt, Dublin, and Oregon) One API endpoint: hdps:/ /global.faas.website/hello
  8. Serverless Framework Support serverless-domain-manager plugin clda.co/sls-mul,-region serverless-dynamodb-autoscaling plugin Mul,ple deployments

    (once per region, eventually in parallel) Not 100% CloudForma,on (bash scripts for cer,ficates, custom domains, global table, and latency records)
  9. Amazon Cer,ficate Manager (ACM) One cer-ficate for each region (for

    APIG custom domain) clda.co/sls-mul,-region Semi-automa,c one-,me process (human interven,on) Automa,c renewal (no ac,on required)
  10. Regional endpoints Vs. Edge-op,mized endpoints (APIG) Regional endpoints don’t use

    CloudFront’s CDN (latency) clda.co/sls-mul,-region CloudFront’s cache might speed up your LBR endpoint * * It doesn’t work on the same custom domain (cer,ficates & DNS)
  11. DynamoDB Global Tables Only 5 regions supported for now clda.co/sls-mul,-region

    Tables must be empty to add a new region Don’t forget Auto Scaling (write capacity is shared!)
  12. clda.co/sls-mul,-region Overall cost almost +30% Similar cost for Lambda and

    APIGateway DynamoDB cost ~2x Increased mul,-region costs * * guess,mate for 2 regions