Share
Embed
Transcript
65 slides
-
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. U T R E C H T 1 9 J U N E 2 0 1 9 -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Building Global Services with Serverless! Marek Kuczynski Sr Solutions Architect - startups Amazon Web Services marekq -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Before we get started, let’s take a look at some fundamentals. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Availability in parallel A = 1 – (1 – Ax)2 Part X Part X -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Availability in parallel Component Availability Downtime X 99% (2-nines) 3 days 15 hours Two X in parallel 99.99% (4-nines) 52 minutes Three X in parallel 99.9999% (6-nines) 31 seconds -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Component redundancy increases availability significantly! -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 21 Geographic Regions 66 Availability Zones (AZs) 4 regions and 12 more Availability Zones announced -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Region and availability zones Region Availability zone a Availability zone b Availability zone c data center data center data center data center data center data center data center data center data center -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Multi-AZ architecture Region Availability zone a Availability zone b Availability zone c Application Application Application -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Multi-region Region Availability zone a Availability zone b Availability zone c Application Region Availability zone a Availability zone b Availability zone c Application Application Application Application Application -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Serverless components Region Availability zone a Availability zone b Availability zone c Serverless Services -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Why serverless components?? No provisioning, no management Pay for value Fault Tolerant and Automatic scaling Highly available and secure -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Serverless is a spectrum More operations Less operations -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Why build a multi-region active-active architecture? -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Improve latency for end-users ~300ms ~140ms -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 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 -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Prerequisites to building a multi-region architecture. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. CAP Theorem Consistency Availability Partition Tolerance Data is consistent. All nodes see the same state. Every request is non-failing. Service still responds as expected if some nodes crash. Distributed System In the presence of a network partition, you must choose between consistency and availability! -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Embrace eventual consistency … if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value. Availability An eventually consistent system can return any value before it converges!! https://en.wikipedia.org/wiki/Eventual_consistency Distributed System Every request is non-failing. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Secure and reliable global network -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon Global Network -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Data replication. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Replicates your data with no impact on database performance Typical cross-region replication latencies below 1 second An Aurora cluster can recover in less than 1 minute even in the event of a complete regional outage Recovery Point Objective (RPO) of 1 second Recovery Time Objective (RTO) of less than 1 minute Amazon Aurora Global Database Designed for globally distributed applications Globally dispersed users Replica (N. America) Replica (Europe) Replica (Asia) Global App Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 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 -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon S3 cross-region replication Bucket with objects Bucket with objects -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Global routing with Route 53 -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Latency based routing Region Region Application Application -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Geo-based routing Region us-east-1 Region us-west-2 Application Application -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Weighted round robin routing Region us-east-1 Region us-west-2 Application Application -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. DNS failover Region us-east-1 Region us-west-2 Application Application -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table https://global.marek.host -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 https://global.marek.host Regional API Endpoint Custom Domain Name Regional API Endpoint Custom Domain Name -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Route53: Traffic Policy -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Health checks with Route 53 -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Shallow health check Instance or function Cache node Email database Cluster Are you healthy? yes -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Shallow health check Instance or function Cache node Email database Cluster Are you healthy? yes -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Deep health check Instance or function Cache node Email database Cluster Are you healthy? yes Are you healthy? yes yes yes yes -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Deep health check Instance or function Cache node Email database Cluster Are you healthy? no Are you healthy? no yes yes yes CACHE RESULTS!!! -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Global Accelerator -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Global Accelerator Application Load Balancer Lambda Function DynamoDB Global Table Route 53 Latency Routing API Gateway Regional API Lambda Function DynamoDB Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table 2x Anycast IPs Global Accelerator -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Region eu-west-1 Region ap-northeast-1 Global Table 2x Anycast IPs Global Accelerator Voilà! -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. https://medium.com/@adhorn Further reading on this topic -
Thank you! © 2019, Amazon Web Services, Inc. or its
affiliates. All rights reserved. Marek Kuczynski marekq