Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

35
Building Fault-Tolerant Applications in the Cloud Advanced Solutions Architecture Miles Ward

description

 

Transcript of Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Page 1: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Building Fault-Tolerant Applications in the Cloud

Advanced Solutions ArchitectureMiles Ward

Page 2: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Faults? Facilities

Hardware

Networking

Code

People

Page 3: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

What is “Fault-Tolerant”?

Degrees of risk mitigation - not binary

Automated

Tested!

Page 4: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Agenda

The AWS Approach

Building Blocks

Success Example:

Design Patterns

Page 5: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Old School Fault-Tolerance: Build Two

Page 6: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

No Up-Front Capital Expense

Pay Only for What You Use

Self-Service Infrastructure

Easily Scale Up and Down

Improve Agility & Time-to-Market

Low Cost

Cloud Computing Benefits

Deploy

Page 7: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

No Up-Front HA Capital Expense

Pay for DR Only When You Use it

Self-Service DR Infrastructure

Easily Deliver Fault-Tolerant

Applications

Improve Agility & Time-to-Recovery

Low Cost Backups

Cloud Computing Fault-Tolerance Benefits

Deploy

The benefits translate!

Page 8: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

AWS Cloud allows Overcast Redundancy

Have the shadow duplicate of your infrastructure ready to go when you need it…

…but only pay for what you actually use

Page 9: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Old Barriers to HA are now Surmountable

Cost

Complexity

Expertise

Page 10: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

AWS Building Blocks: Two Strategies

Inherently fault-tolerant services

Services that are fault-tolerant with the right architecture

S3SimpleDb

DynamoDBCloudfront

SWF, SQS, SNS, SESRoute53

Elastic Load BalancerElastic Beanstalk

ElastiCacheElastic MapReduce

IAM

Amazon EC2VPC EBSRDS

Page 11: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

The Stack:

Resources

Deployment

Management

Configuration

Networking

Facilities

Geographies

Page 12: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

The Stack:

EC2 Instances

Amazon Machine Images

CW Alarms - AutoScaling

Cloudformation - Beanstalk

Route53 – ElasticIP – ELB

Availability Zones

Regions

Page 13: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Regional Diversity

Use Regions for:

Latency• Customers• Data Vendors• Staff

Compliance

Disaster Recovery

… and Fault Tolerance!

Page 14: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Proper Use of Multiple Availability Zones

Page 15: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

107.22.18.45 isn’t fault-tolerant but 50.17.200.146 is: EIP

Elastic Load Balancing

Automated DNS: Route53

New! Latency-Based Routing

Network Fault-Tolerance Tools

Page 16: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Cloudformation – Elastic Beanstalk

Q: Is your stack unique?

Page 17: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Cloudwatch – Alarms – AutoScaling

Page 18: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

AMI’s

Maintenance is critical

Alternatives: Chef, Puppet, cfn-init, etc.

New! When in doubt: 64-bit

Replicate for DR

Page 19: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

EC2 Instances

Consistent, reliable building block

100% API controlled

Reserved Instances

EBS

Immense Fleet Scale

Page 20: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

New EC2 VPC feature: Elastic Network Interface

Up to 2 Addresses

Span Subnets

Attach/Detach

Public or Private

Page 21: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Example: a “fork-lifted” app

Page 22: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Example: Fault-Tolerant

Page 23: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Why mess with all of that?

Page 24: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC
Page 25: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Design For Failure

SPOF

Page 26: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Build Loosely Coupled Systems

Tight Coupling

Loose Coupling using Queues

Copyright © 2011 Amazon Web Services

Page 27: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Use the right approach for each tier

AWS

Page 28: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Fault-Tolerant Front-end Systems

Addressing: Route53, EIP

Distribution: Multi-AZ, ELB, Cloudfront

Redundancy: Auto-Scaling

Monitoring: Cloudwatch

Platform: Elastic Beanstalk

Amazon CloudFront

Amazon CloudWatch

Auto Scaling

Amazon Route 53

Elastic LoadBalancer

AWS ElasticBeanstalk

Elastic IP

Page 29: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Fault-Tolerant Data-Tier Systems

Tuned

Patched

Cached

Sharded

Replicated

Backed Up

Archived

Monitored

Page 30: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Fault-Tolerant Data-Tier Systems

Tuned

Patched

Cached

Sharded

Replicated

Backed Up

Archived

Monitored

LOTSOF

WORK

Page 31: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

AWS Fault-Tolerant Data-Tier Services

S3

SimpleDB

EMR

New! DynamoDB

RDS

Amazon Elastic MapReduce

Amazon Simple Storage Service

(S3)

Amazon Relational Database Service

(RDS)

Amazon SimpleDB

Amazon DynamoDB

Amazon ElastiCache

Page 32: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

RDS Fault-Tolerant Features

Multi-AZ Deployments

Read Replicas

Automated Backups

Snapshots

RDS DB Instance RDS DB InstanceMulti-AZ Standby

Page 33: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

New! Storage GatewayYour Datacenter

Amazon Elastic Block Storage

(EBS)

Amazon Elastic Compute Cloud

(EC2)

Amazon Simple Storage Service (S3)

Clients

On-premises Host

AWS Storage Gateway

VM

Direct Attached or Storage Area Network Disks

SSL

Internetor

Direct Connect

AWS Storage Gateway Service

Application Servers

Page 34: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Test! Use a Chaos Monkey!

http://techblog.netflix.com/2010/12/5-lessons-weve-learned-using-aws.html

Prudent

Conservative

Professional

…and all the cool kids are doing it

Page 35: Building Fault Tolerant Applications in the cloud - AWS Summit 2012 - NYC

Thank You!@milesward