SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Building Web-Scale Applications with AWS
Simon Elisha / Principal Solution Architect

James Hamilton / Vice President & Distinguished Engineer
8
Months of Travel
7
Minutes of Terror
100,000
 Concurrent Viewers
0
Second Chances
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201…
A Tale of Web Scale

Streaming images and video
of Curiosity’s landing on
Mars
•   Multiple Regions – fully automated
•   Each stack handles up to 25 Gbps of traffic
•   Dynamically handles spikes in load
•   Spreads workload across geographies
•   Over 100 instances per stack
•   All gone away now…
The Artist compared to the Architect
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201…
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201…
Primary Colors

Fundamental Design Considerations for
   Web-Scale Applications on AWS
1. Design for Failure
                             and nothing will really fail




"Everything fails, all the time"
Werner Vogels, CTO Amazon.com
• Avoid single points of failure
• Assume everything fails, and design backwards
• Goal: Applications should continue to function even if the underlying physical
  hardware fails or is removed or replaced
2. Loose coupling sets you free
                    The looser they're coupled, the bigger they scale


   •   Independent components
   •   Design everything as a black box
   •   De-couple interactions
   •   Load-balance clusters

Use Amazon SQS as Buffers
          Tight Coupling             Controller A        Controller B        Controller C

                                 Q                   Q                   Q
          Loose Coupling
           using Queues               Controller A        Controller B        Controller C
3. Implement Elasticity
                Elasticity is a fundamental property of the Cloud

                   • Don’t assume health or fixed location of components
                   • Use designs that are resilient to reboot and re-launch
                   • Bootstrap your instances: Instances on boot will ask a question
                     “Who am I & what is my role?”
                   • Enable dynamic configuration




• Use Auto-scaling (Free)
• Use [Elastic] Load Balancing on multiple layers
• Use configurations in SimpleDB/S3/etc to bootstrap instance
4. Build Security in every layer
                            Design with Security in mind


With the cloud, you lose a little bit of
physical control, but not your ownership

•   Create distinct Security Groups for each Amazon EC2 tier
•   Use security group-based rules to control access between layers
•   Use Virtual Private Cloud (VPC) to combine internal and AWS assets
•   Encrypt data “at-rest” in Amazon S3
•   Encrypt data “in-transit” (SSL)
•   Consider encrypted file systems in EC2 for sensitive data
•   Use AWS Identity & Access Management (IAM)
•   Use MultiFactor Authentication (MFA)
5. Don't fear constraints
                       Re-think architectural constraints
                        More RAM? Distribute load across machines
                        Shared distributed cache
Better IOPS on my database?
Multiple read-only / sharding / DB clustering / Caching /
Provisioned IOPs / SSD instances
                                                     Hardware Config does not
Your hardware failed or messed up config?            match?
Simply throw it away and switch to new hardware with Implement Elasticity
no additional cost
               Performance
               Caching at different levels (Page, Render, DB)
6. Think Parallel
                       Serial and Sequential are now history




•   Multi-threading and concurrent requests to cloud services
•   Run parallel MapReduce Jobs
•   Use Elastic Load Balancing to distribute load across multiple servers
•   Decompose a Job into its simplest form
7. Leverage multiple storage options
                         One size DOES NOT fit all

Amazon Simple Storage Service (Amazon S3): large static objects
Amazon Glacier: long term archival of objects
Amazon CloudFront: content distribution
Amazon DynamoDB: infinitely scalable NoSQL “Big Tables”
Amazon ElastiCache: in memory caching
Amazon CloudSearch: fast, highly-scalable search functionality
Amazon Elastic Compute Cloud (Amazon EC2) local disk drive : transient data
Amazon Elastic Block Store (Amazon EBS): persistent storage + snapshots on S3
Amazon EBS PIOPs: consistent, persistent storage for any RDBMS + Snapshots on S3
Amazon Relation Database Service (Amazon RDS): RDBMS service –
Automated and Managed MySQL, Oracle & SQL Server
Amazon EC2 High I/O Instances: high performance, local SSD-backed storage
More Advanced Techniques
Stateless Software Architecture

Does not retain information about the last
session into the next – e.g. user data,
parameters, logic outcomes.

You know – like that thing called the HTTP
Protocol…
Lets you Auto Scale
                                Trigger auto-
                                scaling policy


as-create-auto-scaling-group MyGroup
     --launch-configuration MyConfig
     --availability-zones eu-west-1a
     --min-size 4
     --max-size 200

  Deployment & Administration          Auto Scaling
                                       Automatic re-sizing of compute clusters based on demand
           App Services                             Feature    Details
                                                     Control   Define minimum and maximum instance pool
 Compute     Storage      Database                             sizes and when scaling and cool down occurs.

                                        Integrated to Amazon   Use metrics gathered by CloudWatch to drive
           Networking                            CloudWatch    scaling.
                                              Instance types   Run Auto Scaling for On-Demand and Spot
    AWS Global Infrastructure                                  Instances. Compatible with VPC.
…and Spread the Load

Elastic Load Balancing
•    Create highly scalable applications
•    Distribute load across EC2 instances in
multiple availability zones
                                                     Feature    Details
                                                   Available    Load balance across instances in multiple
    Deployment & Administration                                 Availability Zones
                                              Health checks     Automatically checks health of instances and
           App Services                                         takes them in or out of service
                                           Session stickiness   Route requests to the same instance
Compute       Storage     Database
                                      Secure sockets layer      Supports SSL offload from web and application
            Networking                                          servers with flexible cipher support

                                                 Monitoring     Publishes metrics to CloudWatch
     AWS Global Infrastructure
But usually some state has to reside somewhere

   Cookies in browser



         Session database



               Memory-resident session manager



                        Framework provided session handler
So this store of state needs to be…


  Performant

      Scalable


           Reliable
Where should session state reside?
                Trigger auto-
                scaling policy




           Not Here


Here           Session State
                  Service          State must reside OUTSIDE
                                 the scope of the elements you
                                                  wish to scale
And what do I build it on?
The state service itself must
be well architected
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201…
“If at first you don’t succeed…”

Retry logic is fundamental to scalable
design

But without back-off logic, your service
may still “break”

Use Idempotency as “secret sauce”
Without retries, the Web would not work.
Assumes things will fail, and we will need to retry.




           What is the difference between a bad network and a failing host?
           Nothing that is perceptible to client semantics.
           So long as another node is available to accept the request and the system
           is idempotent by design.



       Retry is now familiar behavior for users.
       E.g. refresh your web page, refresh Twitter, etc.
Beware “Thundering Herds”
(and their ilk)

How do you service a large set of requests
all at the same time?

What if your service failed or degraded and
then tries to restore in the face of large
pent-up transaction volumes?

What if lots of customers keep hitting
“refresh” on their requests?
Back-off logic ensures that retries do
not all “consolidate”

Without this, the service will be flooded
and may enter a vicious cycle
Exponential Backoff Algorithm

  currentRetry = 0
  DO
   status = execute Amazon SimpleDB request
   IF status = success OR status = client error (4xx)
     set retry to false
     process the response or client error as appropriate
   ELSE
     set retry to true
     currentRetry = currentRetry + 1
     wait for a random delay between 0 and (4^currentRetry * 100) milliseconds
   END-IF
  WHILE (retry = true AND currentRetry < MaxNumberOfRetries)
Idempotence

The property of an operation whereby it
can be applied multiple times without
changing the result beyond the initial
application.

It keeps you “safe” because executing the
same thing twice (or more) has no more
affect than doing it once.
EC2 Instance Creation Example




PROMPT> ec2-run-instances ami-b232d0db -k gsg-keypair --client-
token 550e8400-e29b-41d4-a716-446655440000
CAP Theorem



               Consistency




         Partition
                       Availability
         Tolerance
CAP Examples…

      Synchronously replicated databases in normal
 CA
      operation


 CP
      Read-only storage systems, synchronously
      replicated databases when partitioned,
      membase


 AP
      Multi-master / asynchronously replicated
      databases (Active Directory, Outlook and
      Exchange, DNS)
CAP Theory 12 Years on…

            Not as simple as “choose 2 out of 3”
?           Partitions are rare – so why sacrifice C or A for a rare/managed event?
            CAP attributes are continuous rather than binary measures – particularly in complex systems.

                Managing partitions enables the “easy” choice of C & A
    ?           Mitigate effect of P on C & A for the cases that P can occur.


                     A function/operation-level decision, not system level.
        ?            e.g. an ATM can still accept deposits during Partition.


                         Latency and the Partition decision are closely related
            ?             Designers can set time bounds intentionally according to target response times;
                          systems with tighter bounds will likely enter partition mode more often and at times
                          when the network is merely slow and not actually partitioned.

                         *http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
Paxos clusters
 Paxos algorithm comes as close as possible (in
  known CompSci) to achieving CAP
 CA distributed state machine in normal operation
 Multi-master, quorum based (can define quorum
  size, but must be at least bare majority) -
  Consensus
 Can tolerate any kind of partition so long as
  quorum is maintained (becomes “unavailable” for
  clients of non-quorum nodes)
 Formally proven to provide reliable distributed
  state transitions (updates, aka “availability”)
    But not infinite time
    In practice, it works out ok
Paxos sounds tricky to implement…
 Shift that kind of work off to other systems
 E.g. DynamoDB conditional writes (idempotent too!)
    Update only if the specified condition is met




// This updates the price only if current price is 10.00.
         expectedValues.put("Price",
             new ExpectedAttributeValue()
                .withValue(new AttributeValue().withN(“10.00")));
Data Tier Scalability

The bane of the Architect’s existence
Vertical Scaling

  “We need a bigger box”
  • Simplest Approach
  • Can now leverage PIOPS
  • High I/O for NoSQL DBs
  • Easy to change instance sizes
  • Will hit an “end point” eventually


                                         hi1.4xlarge
                                                m2.4xlarge
                                                       m1.small
Master/Slave Horizontal Scaling   • Reasonably simple to adapt to
                                  • Can now leverage PIOPS
                                  • Easy to change instance sizes
                                  • Will hit an “end point” eventually
• More complex at application layer
Sharded Horizontal Scaling
                                         • ORM support can help
                                         • No practical limit on scalability
  “With great power comes                • Operational

  great responsibility”                     complexity/sophistication
                                         • Shard by function or key-space
                             D       A   • RDBMS or NoSQL
                             Hash Ring

                             C      B
Horizontal Scaling – Fully Managed
DynamoDB                                             Feature     Details
•   Provisioned throughput NoSQL database         Provisioned    Dial up or down provisioned read/write
•   Fast, predictable performance                 throughput     capacity
•   Fully distributed, fault tolerant             Predictable    Average single digit millisecond latencies
                                                 performance     from SSD backed infrastructure
    architecture
•   Considerations for non-uniform data     Strong consistency   Be sure you are reading the most up to
                                                                 date values
                                                Fault tolerant   Data replicated across availability zones

                                                   Monitoring    Integrated to CloudWatch
                                                       Secure    Integrates with AWS Identity and Access
                                                                 Management (IAM)
                                                      Elastic    Integrates with Elastic MapReduce for
                                                  MapReduce      complex analytics on large datasets
Creating a Masterpiece
     for the Ages
Use these techniques
(and many, many others)

SITUATIONALLY
AWARENESS
of the options is the first
   step to good design
SCALING
  is the ability to move
 bottlenecks around to
the least expensive part
    of the architecture
AWS
makes this easier – so
your application is not
 the victim of its own
        success
For perspective…

   Please welcome


James Hamilton
Top 10 5 Ways to Early Post Mortem

 5. We’ll add monitoring & alerting as we get production
 experience & a baseline
 4. We don’t need incremental deployment for V1
 3. We’ll get into production & add automated testing
 before second release
 2. All our test cases are passing
 1. We can partition the database when needed – We
 have 10x capacity needed for first year
Thank You

     Questions?

       @simon_elisha

http://aws.amazon.com/podcast
We are sincerely eager to
hear your FEEDBACK on this
presentation and on re:Invent.

 Please fill out an evaluation
   form when you have a
            chance.

Weitere ähnliche Inhalte

Was ist angesagt?

Cloud computing for Teachers and Students
Cloud computing for Teachers and StudentsCloud computing for Teachers and Students
Cloud computing for Teachers and StudentsMukesh Tekwani
 
Software defined datacenter SDDC
Software defined datacenter SDDCSoftware defined datacenter SDDC
Software defined datacenter SDDCpsjitha
 
Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price.
Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price. Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price.
Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price. Amazon Web Services
 
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用Amazon Web Services
 
Nginx Deep Dive Kubernetes Ingress
Nginx Deep Dive Kubernetes IngressNginx Deep Dive Kubernetes Ingress
Nginx Deep Dive Kubernetes IngressKnoldus Inc.
 
AWS 101 Lunch and Learn | London
AWS 101 Lunch and Learn | LondonAWS 101 Lunch and Learn | London
AWS 101 Lunch and Learn | LondonAmazon Web Services
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...Amazon Web Services
 
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016Amazon Web Services Korea
 
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018Amazon Web Services
 
AWS VPC & Networking basic concepts
AWS VPC & Networking basic conceptsAWS VPC & Networking basic concepts
AWS VPC & Networking basic conceptsAbhinav Kumar
 
AWS August Webinar Series - Services Overview
AWS August Webinar Series - Services Overview AWS August Webinar Series - Services Overview
AWS August Webinar Series - Services Overview Amazon Web Services
 
Introduction to Amazon CloudFront - Pop-up Loft Tel Aviv
Introduction to Amazon CloudFront - Pop-up Loft Tel AvivIntroduction to Amazon CloudFront - Pop-up Loft Tel Aviv
Introduction to Amazon CloudFront - Pop-up Loft Tel AvivAmazon Web Services
 
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016Amazon Web Services
 
AWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFront
AWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFrontAWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFront
AWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFrontAmazon Web Services
 

Was ist angesagt? (20)

Cloud computing
Cloud computingCloud computing
Cloud computing
 
Cloud computing for Teachers and Students
Cloud computing for Teachers and StudentsCloud computing for Teachers and Students
Cloud computing for Teachers and Students
 
AWS
AWSAWS
AWS
 
Software defined datacenter SDDC
Software defined datacenter SDDCSoftware defined datacenter SDDC
Software defined datacenter SDDC
 
Introduction to CloudFront
Introduction to CloudFrontIntroduction to CloudFront
Introduction to CloudFront
 
Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price.
Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price. Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price.
Amazon Lightsail: Jumpstart Your Cloud Project for a Low, Predictable Price.
 
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
 
Nginx Deep Dive Kubernetes Ingress
Nginx Deep Dive Kubernetes IngressNginx Deep Dive Kubernetes Ingress
Nginx Deep Dive Kubernetes Ingress
 
AWS 101 Lunch and Learn | London
AWS 101 Lunch and Learn | LondonAWS 101 Lunch and Learn | London
AWS 101 Lunch and Learn | London
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
 
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
 
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
Database Migration Using AWS DMS and AWS SCT (GPSCT307) - AWS re:Invent 2018
 
Platform as a Service (PaaS)
Platform as a Service (PaaS)Platform as a Service (PaaS)
Platform as a Service (PaaS)
 
AWS VPC & Networking basic concepts
AWS VPC & Networking basic conceptsAWS VPC & Networking basic concepts
AWS VPC & Networking basic concepts
 
AWS August Webinar Series - Services Overview
AWS August Webinar Series - Services Overview AWS August Webinar Series - Services Overview
AWS August Webinar Series - Services Overview
 
Introduction to Amazon CloudFront - Pop-up Loft Tel Aviv
Introduction to Amazon CloudFront - Pop-up Loft Tel AvivIntroduction to Amazon CloudFront - Pop-up Loft Tel Aviv
Introduction to Amazon CloudFront - Pop-up Loft Tel Aviv
 
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
 
AWS SQS SNS
AWS SQS SNSAWS SQS SNS
AWS SQS SNS
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
AWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFront
AWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFrontAWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFront
AWS 201 - A Walk through the AWS Cloud: Introduction to Amazon CloudFront
 

Andere mochten auch

(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...Amazon Web Services
 
Delivering on the promise of the cloud for digital media, aspera on demand
Delivering on the promise of the cloud for digital media, aspera on demandDelivering on the promise of the cloud for digital media, aspera on demand
Delivering on the promise of the cloud for digital media, aspera on demandAmazon Web Services
 
Accelerating Your Connection to the Cloud
Accelerating Your Connection to the CloudAccelerating Your Connection to the Cloud
Accelerating Your Connection to the CloudAmazon Web Services
 
Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Adnene Guabtni
 
Japanese CloudSearch Use-Cases and Tech Deep Dive
Japanese CloudSearch Use-Cases and Tech Deep DiveJapanese CloudSearch Use-Cases and Tech Deep Dive
Japanese CloudSearch Use-Cases and Tech Deep DiveEiji Shinohara
 
How to Extend your Datacenter into the Cloud - 2nd Watch - Webinar
How to Extend your Datacenter into the Cloud - 2nd Watch - WebinarHow to Extend your Datacenter into the Cloud - 2nd Watch - Webinar
How to Extend your Datacenter into the Cloud - 2nd Watch - WebinarAmazon Web Services
 
AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAmazon Web Services
 
Implementing FISMA Moderate Applications on AWS
Implementing FISMA Moderate Applications on AWSImplementing FISMA Moderate Applications on AWS
Implementing FISMA Moderate Applications on AWSAmazon Web Services
 
BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012
BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012
BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012Amazon Web Services
 
Big Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend StoryBig Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend StoryAmazon Web Services
 
AWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearch
AWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearchAWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearch
AWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearchAmazon Web Services
 
How to Tune Search Requests using Amazon CloudSearch
How to Tune Search Requests using Amazon CloudSearchHow to Tune Search Requests using Amazon CloudSearch
How to Tune Search Requests using Amazon CloudSearchAmazon Web Services
 
Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...
Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...
Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...Amazon Web Services
 
Meetup - Using CloudSearch with DynamoDB
Meetup - Using CloudSearch with DynamoDBMeetup - Using CloudSearch with DynamoDB
Meetup - Using CloudSearch with DynamoDBAmazon Web Services
 
AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...
AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...
AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...Amazon Web Services
 
Building Web Scale Applications with AWS
Building Web Scale Applications with AWSBuilding Web Scale Applications with AWS
Building Web Scale Applications with AWSAmazon Web Services
 

Andere mochten auch (20)

(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
 
Delivering on the promise of the cloud for digital media, aspera on demand
Delivering on the promise of the cloud for digital media, aspera on demandDelivering on the promise of the cloud for digital media, aspera on demand
Delivering on the promise of the cloud for digital media, aspera on demand
 
Accelerating Your Connection to the Cloud
Accelerating Your Connection to the CloudAccelerating Your Connection to the Cloud
Accelerating Your Connection to the Cloud
 
AWS Introduction - Ryland
AWS Introduction - RylandAWS Introduction - Ryland
AWS Introduction - Ryland
 
Amazon SimpleDB
Amazon SimpleDBAmazon SimpleDB
Amazon SimpleDB
 
Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...
 
Japanese CloudSearch Use-Cases and Tech Deep Dive
Japanese CloudSearch Use-Cases and Tech Deep DiveJapanese CloudSearch Use-Cases and Tech Deep Dive
Japanese CloudSearch Use-Cases and Tech Deep Dive
 
How to Extend your Datacenter into the Cloud - 2nd Watch - Webinar
How to Extend your Datacenter into the Cloud - 2nd Watch - WebinarHow to Extend your Datacenter into the Cloud - 2nd Watch - Webinar
How to Extend your Datacenter into the Cloud - 2nd Watch - Webinar
 
AWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWSAWS Startup Webinar | Developing on AWS
AWS Startup Webinar | Developing on AWS
 
Implementing FISMA Moderate Applications on AWS
Implementing FISMA Moderate Applications on AWSImplementing FISMA Moderate Applications on AWS
Implementing FISMA Moderate Applications on AWS
 
BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012
BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012
BDT101 Big Data with Amazon Elastic MapReduce - AWS re: Invent 2012
 
Big Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend StoryBig Data and the Cloud a Best Friend Story
Big Data and the Cloud a Best Friend Story
 
Amazon cloud search comparison report
Amazon cloud search comparison reportAmazon cloud search comparison report
Amazon cloud search comparison report
 
Wordnet Introduction
Wordnet IntroductionWordnet Introduction
Wordnet Introduction
 
AWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearch
AWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearchAWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearch
AWS Webcast - Build a Scalable Search Engine with the New Amazon CloudSearch
 
How to Tune Search Requests using Amazon CloudSearch
How to Tune Search Requests using Amazon CloudSearchHow to Tune Search Requests using Amazon CloudSearch
How to Tune Search Requests using Amazon CloudSearch
 
Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...
Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...
Enrich Search User Experience Using Amazon CloudSearch (SVC302) | AWS re:Inve...
 
Meetup - Using CloudSearch with DynamoDB
Meetup - Using CloudSearch with DynamoDBMeetup - Using CloudSearch with DynamoDB
Meetup - Using CloudSearch with DynamoDB
 
AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...
AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...
AWS Webcast - Getting Started With CloudSearch: Add Powerful Search To Your W...
 
Building Web Scale Applications with AWS
Building Web Scale Applications with AWSBuilding Web Scale Applications with AWS
Building Web Scale Applications with AWS
 

Ähnlich wie ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201…

AWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the CloudAWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the CloudAmazon Web Services
 
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh VariaAWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh VariaAmazon Web Services
 
Architecting for the Cloud: Best Practices
Architecting for the Cloud: Best PracticesArchitecting for the Cloud: Best Practices
Architecting for the Cloud: Best PracticesAmazon Web Services
 
NWCloud Cloud Track - Best Practices for Architecting in the Cloud
NWCloud Cloud Track - Best Practices for Architecting in the CloudNWCloud Cloud Track - Best Practices for Architecting in the Cloud
NWCloud Cloud Track - Best Practices for Architecting in the Cloudnwcloud
 
Architecting Cloud Apps
Architecting Cloud AppsArchitecting Cloud Apps
Architecting Cloud Appsjineshvaria
 
AWS Summit 2011: Architecting in the cloud
AWS Summit 2011: Architecting in the cloudAWS Summit 2011: Architecting in the cloud
AWS Summit 2011: Architecting in the cloudAmazon Web Services
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Tom Laszewski
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015Amazon Web Services Korea
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWSTom Laszewski
 
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...Amazon Web Services
 
Aws webcast - Scaling on AWS 13 08-20
Aws webcast - Scaling on AWS 13 08-20Aws webcast - Scaling on AWS 13 08-20
Aws webcast - Scaling on AWS 13 08-20Amazon Web Services
 
Best Practices for Architecting in the Cloud - Jeff Barr
Best Practices for Architecting in the Cloud - Jeff BarrBest Practices for Architecting in the Cloud - Jeff Barr
Best Practices for Architecting in the Cloud - Jeff BarrAmazon Web Services
 
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWSAmazon Web Services Korea
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersAmazon Web Services
 
AWS Cloud Kata | Manila - Getting to Scale on AWS
AWS Cloud Kata | Manila - Getting to Scale on AWSAWS Cloud Kata | Manila - Getting to Scale on AWS
AWS Cloud Kata | Manila - Getting to Scale on AWSAmazon Web Services
 

Ähnlich wie ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201… (20)

AWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the CloudAWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the Cloud
 
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh VariaAWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
AWS Architecting Cloud Apps - Best Practices and Design Patterns By Jinesh Varia
 
Architecting for the Cloud: Best Practices
Architecting for the Cloud: Best PracticesArchitecting for the Cloud: Best Practices
Architecting for the Cloud: Best Practices
 
NWCloud Cloud Track - Best Practices for Architecting in the Cloud
NWCloud Cloud Track - Best Practices for Architecting in the CloudNWCloud Cloud Track - Best Practices for Architecting in the Cloud
NWCloud Cloud Track - Best Practices for Architecting in the Cloud
 
Architecting Cloud Apps
Architecting Cloud AppsArchitecting Cloud Apps
Architecting Cloud Apps
 
AWS Summit 2011: Architecting in the cloud
AWS Summit 2011: Architecting in the cloudAWS Summit 2011: Architecting in the cloud
AWS Summit 2011: Architecting in the cloud
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
AMAZON CLOUD Course Content
AMAZON CLOUD Course ContentAMAZON CLOUD Course Content
AMAZON CLOUD Course Content
 
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
 
Aws webcast - Scaling on AWS 13 08-20
Aws webcast - Scaling on AWS 13 08-20Aws webcast - Scaling on AWS 13 08-20
Aws webcast - Scaling on AWS 13 08-20
 
Best Practices for Architecting in the Cloud - Jeff Barr
Best Practices for Architecting in the Cloud - Jeff BarrBest Practices for Architecting in the Cloud - Jeff Barr
Best Practices for Architecting in the Cloud - Jeff Barr
 
AWS Architecting In The Cloud
AWS Architecting In The CloudAWS Architecting In The Cloud
AWS Architecting In The Cloud
 
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
AWS Cloud Kata | Manila - Getting to Scale on AWS
AWS Cloud Kata | Manila - Getting to Scale on AWSAWS Cloud Kata | Manila - Getting to Scale on AWS
AWS Cloud Kata | Manila - Getting to Scale on AWS
 
AWS Lunch and Learn - Security
AWS Lunch and Learn - SecurityAWS Lunch and Learn - Security
AWS Lunch and Learn - Security
 
How Easy to Automate Application Deployment on AWS
How Easy to Automate Application Deployment on AWSHow Easy to Automate Application Deployment on AWS
How Easy to Automate Application Deployment on AWS
 
Débuter sur le cloud AWS
Débuter sur le cloud AWSDébuter sur le cloud AWS
Débuter sur le cloud AWS
 

Mehr von Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Invent 201…

  • 1. Building Web-Scale Applications with AWS Simon Elisha / Principal Solution Architect James Hamilton / Vice President & Distinguished Engineer
  • 7. A Tale of Web Scale Streaming images and video of Curiosity’s landing on Mars • Multiple Regions – fully automated • Each stack handles up to 25 Gbps of traffic • Dynamically handles spikes in load • Spreads workload across geographies • Over 100 instances per stack • All gone away now…
  • 8. The Artist compared to the Architect
  • 11. Primary Colors Fundamental Design Considerations for Web-Scale Applications on AWS
  • 12. 1. Design for Failure and nothing will really fail "Everything fails, all the time" Werner Vogels, CTO Amazon.com • Avoid single points of failure • Assume everything fails, and design backwards • Goal: Applications should continue to function even if the underlying physical hardware fails or is removed or replaced
  • 13. 2. Loose coupling sets you free The looser they're coupled, the bigger they scale • Independent components • Design everything as a black box • De-couple interactions • Load-balance clusters Use Amazon SQS as Buffers Tight Coupling Controller A Controller B Controller C Q Q Q Loose Coupling using Queues Controller A Controller B Controller C
  • 14. 3. Implement Elasticity Elasticity is a fundamental property of the Cloud • Don’t assume health or fixed location of components • Use designs that are resilient to reboot and re-launch • Bootstrap your instances: Instances on boot will ask a question “Who am I & what is my role?” • Enable dynamic configuration • Use Auto-scaling (Free) • Use [Elastic] Load Balancing on multiple layers • Use configurations in SimpleDB/S3/etc to bootstrap instance
  • 15. 4. Build Security in every layer Design with Security in mind With the cloud, you lose a little bit of physical control, but not your ownership • Create distinct Security Groups for each Amazon EC2 tier • Use security group-based rules to control access between layers • Use Virtual Private Cloud (VPC) to combine internal and AWS assets • Encrypt data “at-rest” in Amazon S3 • Encrypt data “in-transit” (SSL) • Consider encrypted file systems in EC2 for sensitive data • Use AWS Identity & Access Management (IAM) • Use MultiFactor Authentication (MFA)
  • 16. 5. Don't fear constraints Re-think architectural constraints More RAM? Distribute load across machines Shared distributed cache Better IOPS on my database? Multiple read-only / sharding / DB clustering / Caching / Provisioned IOPs / SSD instances Hardware Config does not Your hardware failed or messed up config? match? Simply throw it away and switch to new hardware with Implement Elasticity no additional cost Performance Caching at different levels (Page, Render, DB)
  • 17. 6. Think Parallel Serial and Sequential are now history • Multi-threading and concurrent requests to cloud services • Run parallel MapReduce Jobs • Use Elastic Load Balancing to distribute load across multiple servers • Decompose a Job into its simplest form
  • 18. 7. Leverage multiple storage options One size DOES NOT fit all Amazon Simple Storage Service (Amazon S3): large static objects Amazon Glacier: long term archival of objects Amazon CloudFront: content distribution Amazon DynamoDB: infinitely scalable NoSQL “Big Tables” Amazon ElastiCache: in memory caching Amazon CloudSearch: fast, highly-scalable search functionality Amazon Elastic Compute Cloud (Amazon EC2) local disk drive : transient data Amazon Elastic Block Store (Amazon EBS): persistent storage + snapshots on S3 Amazon EBS PIOPs: consistent, persistent storage for any RDBMS + Snapshots on S3 Amazon Relation Database Service (Amazon RDS): RDBMS service – Automated and Managed MySQL, Oracle & SQL Server Amazon EC2 High I/O Instances: high performance, local SSD-backed storage
  • 20. Stateless Software Architecture Does not retain information about the last session into the next – e.g. user data, parameters, logic outcomes. You know – like that thing called the HTTP Protocol…
  • 21. Lets you Auto Scale Trigger auto- scaling policy as-create-auto-scaling-group MyGroup --launch-configuration MyConfig --availability-zones eu-west-1a --min-size 4 --max-size 200 Deployment & Administration Auto Scaling Automatic re-sizing of compute clusters based on demand App Services Feature Details Control Define minimum and maximum instance pool Compute Storage Database sizes and when scaling and cool down occurs. Integrated to Amazon Use metrics gathered by CloudWatch to drive Networking CloudWatch scaling. Instance types Run Auto Scaling for On-Demand and Spot AWS Global Infrastructure Instances. Compatible with VPC.
  • 22. …and Spread the Load Elastic Load Balancing • Create highly scalable applications • Distribute load across EC2 instances in multiple availability zones Feature Details Available Load balance across instances in multiple Deployment & Administration Availability Zones Health checks Automatically checks health of instances and App Services takes them in or out of service Session stickiness Route requests to the same instance Compute Storage Database Secure sockets layer Supports SSL offload from web and application Networking servers with flexible cipher support Monitoring Publishes metrics to CloudWatch AWS Global Infrastructure
  • 23. But usually some state has to reside somewhere Cookies in browser Session database Memory-resident session manager Framework provided session handler
  • 24. So this store of state needs to be… Performant Scalable Reliable
  • 25. Where should session state reside? Trigger auto- scaling policy Not Here Here Session State Service State must reside OUTSIDE the scope of the elements you wish to scale
  • 26. And what do I build it on? The state service itself must be well architected
  • 28. “If at first you don’t succeed…” Retry logic is fundamental to scalable design But without back-off logic, your service may still “break” Use Idempotency as “secret sauce”
  • 29. Without retries, the Web would not work. Assumes things will fail, and we will need to retry. What is the difference between a bad network and a failing host? Nothing that is perceptible to client semantics. So long as another node is available to accept the request and the system is idempotent by design. Retry is now familiar behavior for users. E.g. refresh your web page, refresh Twitter, etc.
  • 30. Beware “Thundering Herds” (and their ilk) How do you service a large set of requests all at the same time? What if your service failed or degraded and then tries to restore in the face of large pent-up transaction volumes? What if lots of customers keep hitting “refresh” on their requests?
  • 31. Back-off logic ensures that retries do not all “consolidate” Without this, the service will be flooded and may enter a vicious cycle
  • 32. Exponential Backoff Algorithm currentRetry = 0 DO status = execute Amazon SimpleDB request IF status = success OR status = client error (4xx) set retry to false process the response or client error as appropriate ELSE set retry to true currentRetry = currentRetry + 1 wait for a random delay between 0 and (4^currentRetry * 100) milliseconds END-IF WHILE (retry = true AND currentRetry < MaxNumberOfRetries)
  • 33. Idempotence The property of an operation whereby it can be applied multiple times without changing the result beyond the initial application. It keeps you “safe” because executing the same thing twice (or more) has no more affect than doing it once.
  • 34. EC2 Instance Creation Example PROMPT> ec2-run-instances ami-b232d0db -k gsg-keypair --client- token 550e8400-e29b-41d4-a716-446655440000
  • 35. CAP Theorem Consistency Partition Availability Tolerance
  • 36. CAP Examples… Synchronously replicated databases in normal CA operation CP Read-only storage systems, synchronously replicated databases when partitioned, membase AP Multi-master / asynchronously replicated databases (Active Directory, Outlook and Exchange, DNS)
  • 37. CAP Theory 12 Years on… Not as simple as “choose 2 out of 3” ? Partitions are rare – so why sacrifice C or A for a rare/managed event? CAP attributes are continuous rather than binary measures – particularly in complex systems. Managing partitions enables the “easy” choice of C & A ? Mitigate effect of P on C & A for the cases that P can occur. A function/operation-level decision, not system level. ? e.g. an ATM can still accept deposits during Partition. Latency and the Partition decision are closely related ? Designers can set time bounds intentionally according to target response times; systems with tighter bounds will likely enter partition mode more often and at times when the network is merely slow and not actually partitioned. *http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
  • 38. Paxos clusters  Paxos algorithm comes as close as possible (in known CompSci) to achieving CAP  CA distributed state machine in normal operation  Multi-master, quorum based (can define quorum size, but must be at least bare majority) - Consensus  Can tolerate any kind of partition so long as quorum is maintained (becomes “unavailable” for clients of non-quorum nodes)  Formally proven to provide reliable distributed state transitions (updates, aka “availability”)  But not infinite time  In practice, it works out ok
  • 39. Paxos sounds tricky to implement…  Shift that kind of work off to other systems  E.g. DynamoDB conditional writes (idempotent too!)  Update only if the specified condition is met // This updates the price only if current price is 10.00. expectedValues.put("Price", new ExpectedAttributeValue() .withValue(new AttributeValue().withN(“10.00")));
  • 40. Data Tier Scalability The bane of the Architect’s existence
  • 41. Vertical Scaling “We need a bigger box” • Simplest Approach • Can now leverage PIOPS • High I/O for NoSQL DBs • Easy to change instance sizes • Will hit an “end point” eventually hi1.4xlarge m2.4xlarge m1.small
  • 42. Master/Slave Horizontal Scaling • Reasonably simple to adapt to • Can now leverage PIOPS • Easy to change instance sizes • Will hit an “end point” eventually
  • 43. • More complex at application layer Sharded Horizontal Scaling • ORM support can help • No practical limit on scalability “With great power comes • Operational great responsibility” complexity/sophistication • Shard by function or key-space D A • RDBMS or NoSQL Hash Ring C B
  • 44. Horizontal Scaling – Fully Managed DynamoDB Feature Details • Provisioned throughput NoSQL database Provisioned Dial up or down provisioned read/write • Fast, predictable performance throughput capacity • Fully distributed, fault tolerant Predictable Average single digit millisecond latencies performance from SSD backed infrastructure architecture • Considerations for non-uniform data Strong consistency Be sure you are reading the most up to date values Fault tolerant Data replicated across availability zones Monitoring Integrated to CloudWatch Secure Integrates with AWS Identity and Access Management (IAM) Elastic Integrates with Elastic MapReduce for MapReduce complex analytics on large datasets
  • 45. Creating a Masterpiece for the Ages
  • 46. Use these techniques (and many, many others) SITUATIONALLY
  • 47. AWARENESS of the options is the first step to good design
  • 48. SCALING is the ability to move bottlenecks around to the least expensive part of the architecture
  • 49. AWS makes this easier – so your application is not the victim of its own success
  • 50. For perspective… Please welcome James Hamilton
  • 51. Top 10 5 Ways to Early Post Mortem 5. We’ll add monitoring & alerting as we get production experience & a baseline 4. We don’t need incremental deployment for V1 3. We’ll get into production & add automated testing before second release 2. All our test cases are passing 1. We can partition the database when needed – We have 10x capacity needed for first year
  • 52. Thank You Questions? @simon_elisha http://aws.amazon.com/podcast
  • 53. We are sincerely eager to hear your FEEDBACK on this presentation and on re:Invent. Please fill out an evaluation form when you have a chance.