42
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Michele Alessandrini, Sr. Solutions Architect, AWS November 9°, 2016 Move to the Next Scale Go to 1M users

Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ... ... CloudFormation Amazon EC2

  • Upload
    vannhan

  • View
    227

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Michele Alessandrini, Sr. Solutions Architect, AWS

November 9°, 2016

Move to the Next ScaleGo to 1M users

Page 2: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Growth is good…

Dev & Test

Friends & Family

Live GA

…but can be challenging!!Source: http://peterskastner.wordpress.com/2011/02/23/cisco-the-lion-king-fights-for-data-center-fabric-leadership/Source: http://iwgcr.org/fire-destroys-wisconsin-data-center/

Page 3: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2
Page 4: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2
Page 5: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

So how do we scale?

One size does not fit all !!

Page 6: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Global Footprint

Over 1 million active customers per month

across 190 countries

2,300 government agencies

7,000 educational institutions

14 regions

38 availability zones + 4 more coming soon

63 edge locations

AWS is available today in the U.S., Brazil, Europe, Japan, Singapore,

Australia, and China. Additional regions in the UK, France, Canada and

China are expected to come online over the next 12 – 18 months.

Page 7: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

ENTERPRISE

APPS

DEVELOPMENT & OPERATIONSMOBILE SERVICESAPP SERVICESANALYTICS

Data

Warehousing

Hadoop/

Spark

Streaming Data

Collection

Machine

Learning

Elastic

Search

Virtual

Desktops

Sharing &

Collaboration

Corporate

Email

Backup

Queuing &

Notifications

Workflow

Search

Email

Transcoding

One-click App

Deployment

Identity

Sync

Single Integrated

Console

Push

Notifications

DevOps Resource

Management

Application Lifecycle

Management

Containers

Triggers

Resource

Templates

TECHNICAL &

BUSINESS

SUPPORT

Account

Management

Support

Professional

Services

Training &

Certification

Security

& Pricing

Reports

Partner

Ecosystem

Solutions

Architects

MARKETPLACE

Business

Apps

Business

IntelligenceDatabases

DevOps

ToolsNetworkingSecurity Storage

RegionsAvailability

Zones

Points of

Presence

INFRASTRUCTURE

CORE SERVICES

ComputeVMs, Auto-scaling,

& Load Balancing

StorageObject, Blocks,

Archival, Import/Export

DatabasesRelational, NoSQL,

Caching, Migration

NetworkingVPC, DX, DNS

CDN

Access

Control

Identity

Management

Key

Management

& Storage

Monitoring

& Logs

Assessment

and reporting

Resource &

Usage Auditing

SECURITY & COMPLIANCE

Configuration

Compliance

Web application

firewall

HYBRID

ARCHITECTURE

Data

Backups

Integrated

App

Deployments

Direct

Connect

Identity

Federation

Integrated

Resource

Management

Integrated

Networking

API

Gateway

IoT

Rules

Engine

Device

Shadows

Device

SDKs

Registry

Device

Gateway

Streaming Data

Analysis

Business

Intelligence

Mobile

Analytics

Page 8: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

So let’s start from…

Page 9: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

1 User

• Amazon Route 53 for DNS

• A single Elastic IP

• A single Amazon EC2

instance

• With full stack on this host

• Web app

• Database

• Management

• And so on…

Amazon

EC2

instance

Elastic IP

UserAmazon

Route 53

Page 10: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

“We’re gonna need a bigger box”

• Simplest approach

• Can now leverage PIOPS

• High I/O instances

• High memory instances

• High CPU instances

• High storage instances

• Easy to change instance sizes

• Will hit an endpoint eventually

c4.8xlarge

m3.2xlarge

t2.micro

Page 11: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

1 User

• We could potentially get

to a few hundred to a few

thousand depending on

application complexity

and traffic

• No failover

• No redundancy

• Too many eggs in one

basket

EC2

Instance

Elastic IP

UserAmazon

Route 53

Page 12: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Users > 1

First, let’s separate out our

single host into more than

one.

• Web

• Database

Make use of a database

service?Web

Instance

Database

Instance

Elastic IP

UserAmazon

Route 53

Page 13: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Database options

Self-managed Fully managed

Database server

on Amazon EC2

Your choice of

database running on

Amazon EC2

Bring Your Own

License (BYOL)

Amazon

DynamoDB

Managed NoSQL

database service

using SSD storage

Seamless scalability

Zero administration

Amazon RDS

Microsoft SQL Server

Oracle

MySQL

PostgreSQL

MariaDB

Amazon Aurora

BYOL or license

Included

Amazon

Redshift

Massively parallel,

petabyte-scale data

warehouse service

Fast, powerful, and

easy to scale

Page 14: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Users > 100

First, let’s separate out our

single host into more than

one:

• Web

• Database

Use Amazon RDS to make

your life easierWeb

instance

Elastic IP

RDS DB

instance

UserAmazon

Route 53

Page 15: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Users > 1000

Next, let’s address our lack of

failover and redundancy

issues:

Another web instance

• In another Availability Zone

RDS Multi-AZ

Elastic Load Balancing (ELB)

Web

Instance

RDS DB Instance

Active (Multi-AZ)

Availability Zone Availability Zone

Web

Instance

RDS DB Instance

Standby (Multi-AZ)

ELB

Balancer

UserAmazon

Route 53

Page 16: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Elastic Load Balancing

• Highly available

• 1 - 65535

• Health checks

• Session stickiness

• Secure sockets layer

• Monitoring

• Logging

Page 17: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Scaling…

horizontally

ve

rtic

all

y

Page 18: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Users > 10,000s–100,000s

RDS DB Instance

Active (Multi-AZ)

Availability Zone Availability Zone

RDS DB Instance

Standby (Multi-AZ)

ELB

Balancer

RDS DB Instance

Read Replica

RDS DB Instance

Read Replica

RDS DB Instance

Read Replica

RDS DB Instance

Read Replica

Web

Instance

Web

Instance

Web

Instance

Web

Instance

Web

Instance

Web

Instance

Web

Instance

Web

Instance

Amazon

Route 53User

Page 19: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

RDS DB Instance

Active (Multi-AZ)

Availability Zone

ELB

Balancer

Amazon S3

Amazon

CloudFront

Amazon

Route 53User

Shift some load around

Web Instances

• static content to Amazon S3

and Amazon CloudFront

Move…

Page 20: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Amazon Simple Storage Service (S3)

• Object-based storage

• Highly durable

• Great for static assets

• “Infinitely scalable”

• Objects up to 5 TB in size

• Optional encryption

Page 21: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Amazon CloudFront

• Cache content for faster delivery

• Lower load on origin

• Dynamic and static content

• Streaming video

• Custom SSL certificates

• Low TTLs (as short as 0 seconds)

• Free origin fetches?

• Optimized for AWS

Page 22: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Shift some load around

• static content to Amazon S3 and

Amazon CloudFront

Move…

• session/state to Amazon

DynamoDB

• DB caching to Amazon

ElastiCacheRDS DB Instance

Active (Multi-AZ)

Availability Zone

ELB

Balancer

Amazon S3

Amazon

CloudFront

Amazon

Route 53User

ElastiCache DynamoDB

Web Instances

Page 23: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Amazon DynamoDB

• Managed NoSQL database

• Provisioned throughput

• Fast, predictable performance

• Fully distributed, fault tolerant

• JSON support

• Items up to 400 KB

Page 24: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Amazon Elasticache

• Managed Memcached or Redis

• Scale from one to many nodes

• Self-healing (replaces dead instance)

• Single digit ms speeds (usually)

• Local to a single AZ for Memcache

• Multi-AZ possible with Redis

Page 25: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Shift some load around

Move…

• static content to Amazon S3 and Amazon CloudFront

• session/state to Amazon DynamoDB

• DB caching to Amazon ElastiCache

• dynamic content to Amazon CloudFront

RDS DB Instance

Active (Multi-AZ)

Availability Zone

ELB

Balancer

Amazon S3

Amazon

CloudFrontUser

ElastiCache DynamoDB

Web Instances

Amazon

Route 53

Page 26: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Auto Scaling!

Page 27: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Auto Scaling

Automatic resizing of compute clusters

Define min/max pool sizes

CloudWatch metrics drive scaling

On-demand or Spot instances

aws autoscaling create-auto-scaling-group

--auto-scaling-group-name MyGroup

--launch-configuration-name MyConfig

--min-size 4

--max-size 200--availability-zones eu-west-1a, eu-west-1b

Page 28: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Typical weekly traffic to Amazon.com

Page 29: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Typical weekly traffic to Amazon.com

Provisioned capacity

Page 30: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

November

November traffic to Amazon.com

Page 31: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Provisioned capacity

November

November traffic to Amazon.com

Page 32: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

November traffic to Amazon.com

76%

24%November

Provisioned capacity

Page 33: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

November traffic to Amazon.com

November

Page 34: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Users > 500.000+

Availability Zone

Amazon

Route 53User

Amazon S3

Amazon

CloudFront

Availability Zone

ELB

Balancer

DynamoDB

RDS DB Instance

Read Replica

Web

Instance

Web

Instance

Web

Instance

ElastiCache RDS DB Instance

Read Replica

Web

InstanceWeb

Instance

Web

Instance

ElastiCacheRDS DB Instance

Standby (Multi-AZ)RDS DB Instance

Active (Multi-AZ)

Page 35: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Use automation

Page 36: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

AWS application management solutions

Convenience Control

Higher-level services Do it yourself

AWS

Elastic Beanstalk

AWS

OpsWorks

AWS

CloudFormationAmazon EC2

Page 37: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

SOAing

Move services into their own tiers.

• Treat them separately and scale them

independently.

Amazon and AWS do this extensively!

It offers flexibility and greater understanding of

each component

Microservices approach w/ Containers

Leverage API Gateway & Lambda + Application Load Balancing

Page 38: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Loose coupling + SOA = winning

DON’T REINVENT THE WHEEL

• Email

• Queuing

• Transcoding

• Search

• Monitoring

• Metrics

• Logging

• Compute

Amazon

CloudSearchAmazon SQSAmazon SNS

Amazon Elastic

TranscoderAmazon SWFAmazon SES

AWS Lambda

Page 39: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Users >1 million+

RDS DB Instance

Active (Multi-AZ)

Availability Zone

ELB

Balancer

RDS DB Instance

Read Replica

RDS DB Instance

Read Replica

Web

Instance

Web

Instance

Web

Instance

Web

Instance

Amazon

Route 53User

Amazon S3

Amazon

CloudFront

DynamoDB

Amazon SQS

ElastiCache

Worker

Instance

Worker

Instance

Amazon

CloudWatch

Internal App

Instance

Internal App

Instance Amazon SES

Lambda

Page 40: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Next steps?

READ!

aws.amazon.com/documentation

aws.amazon.com/architecture

START USING AWS:

aws.amazon.com/free/

Page 41: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Ask for Help!

forums.aws.amazon.com

aws.amazon.com/premiumsupport/

Your Account Manager

A Solutions Architect

Page 42: Move to the Next Scale - Amazon S3 · PDF fileMove to the Next Scale ...   ... CloudFormation Amazon EC2

Thank you!

Michele Alessandrini – Sr. Solutions Architect – AWS

https://it.linkedin.com/in/michelealessandrini