126
Building Highly Available, Scalable Web Properties with AWS Joe Ziegler Technical Evangelist @jiyosub

Highly Available Web Properties in Aws

Embed Size (px)

Citation preview

Page 1: Highly Available Web Properties in Aws

Building Highly Available, Scalable

Web Properties with AWS

Joe Ziegler │Technical Evangelist

@jiyosub

Page 2: Highly Available Web Properties in Aws

1. ELASTICITY

2. DESIGN FOR FAILURE

3. LOOSE COUPLING

4. SECURITY

5. PERFORMANCE

Page 3: Highly Available Web Properties in Aws

#1ELASTICITY

●○○○○

Page 4: Highly Available Web Properties in Aws

AMAZON EC2ELASTIC COMPUTE CLOUD

Page 5: Highly Available Web Properties in Aws
Page 6: Highly Available Web Properties in Aws

AMAZON CLOUDWATCH

MONITORING FOR AWS RESOURCES

Page 7: Highly Available Web Properties in Aws
Page 8: Highly Available Web Properties in Aws

AUTO SCALINGSCALE UP/DOWN EC2 CAPACITY

Page 9: Highly Available Web Properties in Aws
Page 10: Highly Available Web Properties in Aws

ELASTIC LOAD BALANCING

NETWORK TRAFFIC DISTRIBUTION

Page 11: Highly Available Web Properties in Aws
Page 12: Highly Available Web Properties in Aws

6 am

Page 13: Highly Available Web Properties in Aws

10 am

Page 14: Highly Available Web Properties in Aws

10 am

Page 15: Highly Available Web Properties in Aws

10 am

Page 16: Highly Available Web Properties in Aws

7 pm

Page 17: Highly Available Web Properties in Aws

7 pm

Page 18: Highly Available Web Properties in Aws

7 pm

Page 19: Highly Available Web Properties in Aws

without elasticity you can't accelerate

Page 20: Highly Available Web Properties in Aws

what you really need is…

…adjustable capacity

Page 21: Highly Available Web Properties in Aws

#2DESIGN FOR FAILURE

●●○○○

Page 22: Highly Available Web Properties in Aws

« Everything failsall the time »

Werner Vogels

CTO of Amazon

Page 23: Highly Available Web Properties in Aws

YOUR GOAL

Applications should continue to function even if the underlying physical hardware fails or is

removed or replaced

Page 24: Highly Available Web Properties in Aws

Avoid single points of failure.

Assume everything fails, and design backwards.

Page 25: Highly Available Web Properties in Aws

Avoid single points of failure.

Assume everything fails, and design backwards.

Page 26: Highly Available Web Properties in Aws
Page 27: Highly Available Web Properties in Aws

AMAZON RDSRELATIONAL DATABASE SERVICE

Page 28: Highly Available Web Properties in Aws
Page 29: Highly Available Web Properties in Aws
Page 30: Highly Available Web Properties in Aws

AMAZONROUTE 53

DOMAIN NAME SERVICE

Page 31: Highly Available Web Properties in Aws
Page 32: Highly Available Web Properties in Aws
Page 33: Highly Available Web Properties in Aws
Page 34: Highly Available Web Properties in Aws
Page 35: Highly Available Web Properties in Aws

AMAZON RDS

MULTI-AZDEPLOYMENT

Page 36: Highly Available Web Properties in Aws
Page 37: Highly Available Web Properties in Aws
Page 38: Highly Available Web Properties in Aws
Page 39: Highly Available Web Properties in Aws
Page 40: Highly Available Web Properties in Aws

AMAZON CLOUDWATCH

ALARMS

Page 41: Highly Available Web Properties in Aws
Page 42: Highly Available Web Properties in Aws
Page 43: Highly Available Web Properties in Aws
Page 44: Highly Available Web Properties in Aws
Page 45: Highly Available Web Properties in Aws

AWS BUILDING BLOCKS

Inherently Fault-Tolerant Services Fault-Tolerant with the right architecture

Amazon S3

Amazon SimpleDB

Amazon DynamoDB

Amazon CloudFront

Amazon SWF

Amazon SQS

Amazon SNS

Amazon SES

Amazon Route53

Elastic Load Balancing

AWS IAM

AWS Elastic Beanstalk

AmazonElastiCache

Amazon EMR

Amazon CloudSearch

Amazon EC2

Amazon EBS

Amazon RDS

Amazon VPC

Page 46: Highly Available Web Properties in Aws
Page 47: Highly Available Web Properties in Aws

NETFLIX

CHAOS MONKEY

Page 48: Highly Available Web Properties in Aws
Page 49: Highly Available Web Properties in Aws

#3LOOSE

COUPLING●●●○○

Page 50: Highly Available Web Properties in Aws

BUILD LOOSELYCOUPLED SYSTEMS

The looser the are coupled,the bigger they scale

Page 51: Highly Available Web Properties in Aws

Create independent components

Page 52: Highly Available Web Properties in Aws

Create independent components

Design everything as a Black Box

Page 53: Highly Available Web Properties in Aws

Create independent components

Design everything as a Black Box

Think in terms of services

Page 54: Highly Available Web Properties in Aws

RECEIVETRANSCODE& PUBLISH

Page 55: Highly Available Web Properties in Aws

RECEIVETRANSCODE& PUBLISH

QUEUE

Page 56: Highly Available Web Properties in Aws
Page 57: Highly Available Web Properties in Aws
Page 58: Highly Available Web Properties in Aws

AMAZON SQSSIMPLE QUEUE SERVICE

Page 59: Highly Available Web Properties in Aws
Page 60: Highly Available Web Properties in Aws
Page 61: Highly Available Web Properties in Aws

SPAM?

CHECKVIDEO

TOOLONG?

SHORTENVIDEO

NO

YES NO

YES

TRANSCODE

SPAMCHECK

START

PUBLISH& NOTIFY

STOPREJECT

Page 62: Highly Available Web Properties in Aws
Page 63: Highly Available Web Properties in Aws
Page 64: Highly Available Web Properties in Aws

MAINTENANCE

AUDITABILITY

FLEXIBILITY

LOW-LEVEL

Page 65: Highly Available Web Properties in Aws

WHAT ARE WETRYING TO DO?

Page 66: Highly Available Web Properties in Aws

SPAM?

CHECKVIDEO

TOOLONG?

SHORTENVIDEO

NO

YES NO

YES

TRANSCODE

SPAMCHECK

START

PUBLISH& NOTIFY

STOPREJECT

Page 67: Highly Available Web Properties in Aws

SPAM?

CHECKVIDEO

TOOLONG?

SHORTENVIDEO

NO

YES NO

YES

TRANSCODE

SPAMCHECK

START

PUBLISH& NOTIFY

STOPREJECT

Page 68: Highly Available Web Properties in Aws

SPAM?

CHECKVIDEO

TOOLONG?

SHORTENVIDEO

NO

YES NO

YES

TRANSCODE

SPAMCHECK

START

PUBLISH& NOTIFY

STOPREJECT

Page 69: Highly Available Web Properties in Aws

TASKS

DECISIONS

HISTORY

STATELESS !

Page 70: Highly Available Web Properties in Aws

STATELESS SCALES HORIZONTALLY

Page 71: Highly Available Web Properties in Aws

AMAZON SWFWORKFLOW SERVICE FOR SCALABLE,

RESILIENT APPLICATIONS

Page 72: Highly Available Web Properties in Aws

AMAZON SWFKeeps track of :

State Executed tasks Timeouts Errors

Page 73: Highly Available Web Properties in Aws

WORKFLOWACTORS

Page 74: Highly Available Web Properties in Aws

DECIDERSCOORDINATION LOGIC

1. Poll for work on a decision listLong polling: 60 seconds

2. Evaluate workflow execution historySWF sends full history in JSON format

3. Return decision to Amazon SWFUsually scheduling another task

Page 75: Highly Available Web Properties in Aws

WORKERSCOORDINATION LOGIC

1. Poll for work on a specific task listLong polling: 60 seconds

2. Execute works, send heartbeatsSWF sends input data from deciders

3. Return success / failureDetailed data can be provided to deciders

Page 76: Highly Available Web Properties in Aws
Page 77: Highly Available Web Properties in Aws
Page 78: Highly Available Web Properties in Aws

ALLHORIZONTAL SCALING

PATTERNS APPLY

Page 79: Highly Available Web Properties in Aws
Page 80: Highly Available Web Properties in Aws
Page 81: Highly Available Web Properties in Aws
Page 82: Highly Available Web Properties in Aws
Page 83: Highly Available Web Properties in Aws
Page 84: Highly Available Web Properties in Aws
Page 85: Highly Available Web Properties in Aws

NO NEW LANGUAGETO LEARN

YOUR CODE IS YOUR WORKFLOW LANGUAGESWF MAINTAINS STATE

Page 86: Highly Available Web Properties in Aws

AWS FLOW FRAMEWORK

Java Library • Entire workflow can be expressed in sequential code •

Integrated with Java Utils API

Page 87: Highly Available Web Properties in Aws

CHAINED TASKSWITHOUT DECISIONS?

use AMAZON SQS

NOTIFYRECEIVE TRANSCODE

Page 88: Highly Available Web Properties in Aws

TASK GRAPHWITH DECISIONS?

use AMAZON SWF

SPAMCHECK

RECEIVEVIDEO

CHECKLENGTH

REJECTSHORTEN

VIDEOPUBLISH& NOTIFY

GOOD

LONG

OK

SPAM

TRANSCODE

Page 89: Highly Available Web Properties in Aws

#4SECURITY

●●●●○

Page 90: Highly Available Web Properties in Aws

AWS IAMIDENTITY AND ACCESS MANAGEMENT

Page 91: Highly Available Web Properties in Aws
Page 92: Highly Available Web Properties in Aws

MULTI-MULTI-FACTOR AUTHENTICATION

Page 93: Highly Available Web Properties in Aws

SECURITY GROUPSLAYERED SECURITY

Page 94: Highly Available Web Properties in Aws
Page 95: Highly Available Web Properties in Aws
Page 96: Highly Available Web Properties in Aws
Page 97: Highly Available Web Properties in Aws
Page 98: Highly Available Web Properties in Aws

CERTIFICATIONS& COMPLIANCE

SAS 70 Type II audit ISO 27001 Certification Sarbanes-Oxley SOX HIPAA healthcare

FISMA US Federal Government

DIACAP MAC III Sensitive IATO

Page 99: Highly Available Web Properties in Aws

PCI DSS CompliantLEVEL 1 SERVICE PROVIDER

Page 100: Highly Available Web Properties in Aws

#5PERFORMANCE

●●●●●

Page 101: Highly Available Web Properties in Aws

VERTICAL SCALING

Page 102: Highly Available Web Properties in Aws
Page 103: Highly Available Web Properties in Aws

CLUSTER COMPUTE

EIGHT EXTRA LARGE

Intel Xeon E5-2670, eight-coreSandy Bridge architecture

60.5 GB of memory – 3.3 TB of storage

2x

Page 104: Highly Available Web Properties in Aws

CLUSTER GPUQUADRUPLE EXTRA LARGE

Intel Xeon X5570, quad-coreNehalem architecture

NVIDIA Tesla FermiM2050 GPUs

22 GB of memory – 1.7 TB of storage

2x

2x

Page 105: Highly Available Web Properties in Aws

AMAZON ELASTICACHE

MEMCACHED COMPATIBLEIN-MEMORY CACHE

Page 106: Highly Available Web Properties in Aws
Page 107: Highly Available Web Properties in Aws

SEARCHENGINES

Page 108: Highly Available Web Properties in Aws
Page 109: Highly Available Web Properties in Aws

Relevance & Ranking

Page 110: Highly Available Web Properties in Aws

Faceting

Page 111: Highly Available Web Properties in Aws

Range Searching

Page 112: Highly Available Web Properties in Aws

AMAZON CLOUDSEARCHFULLY-MANAGED SEARCH SERVICE

Page 113: Highly Available Web Properties in Aws

+

Page 114: Highly Available Web Properties in Aws

DEMOCRATIZE SEARCH

Amazon CloudSearch delivers a fully-managed search service in the cloud that can be set up and running in less than 1 hour, with automatic scaling for

data & traffic, at a price starting at less than $100 per month.

Page 115: Highly Available Web Properties in Aws
Page 116: Highly Available Web Properties in Aws
Page 117: Highly Available Web Properties in Aws
Page 118: Highly Available Web Properties in Aws
Page 119: Highly Available Web Properties in Aws
Page 120: Highly Available Web Properties in Aws

MEDIA SHARINGREFERENCE ARCHITECTURE

Page 121: Highly Available Web Properties in Aws
Page 122: Highly Available Web Properties in Aws

1. ELASTICITY

2. DESIGN FOR FAILURE

3. LOOSE COUPLING

4. SECURITY

5. PERFORMANCE

Page 123: Highly Available Web Properties in Aws

« If you're not embarrassed when you ship your first version you waited too long »

Matt MullenwegCEO & Founder of WordPress

Page 125: Highly Available Web Properties in Aws

AWS ANZ Customer

Appreciation Day

Is Coming to Sydney

November 13th

#AWSCADAU

Page 126: Highly Available Web Properties in Aws