갑작스러운 유저의 수요 증가에 현명하게 대처하는 방법

Post on 13-Jan-2015

326 views 8 download

description

2014년 2월 18일 대전 DCC, 2월 20일 부산 BEXCO에서 개최되었던 스타트업과 개발자를 위한 클라우드 태권 세미나의 두번째 세션인 Getting to Scale의 발표 자료 입니다.

Transcript of 갑작스러운 유저의 수요 증가에 현명하게 대처하는 방법

Getting to Scale

503Service Temporarily Unavailable

The server is temporarily unable to service your request due to

maintenance downtime or capacity problems. Please try again later.

With AWS, scale from one instance…

…to thousands

Fully automated!

BUT…

How do I scale my architecture to support my first 10M users?

“Think Big, Start Small, Scale Fast”

Eric Ries, author of NY Times bestseller “The Lean Startup”

01

02

03

04

Idea MVP Profitability

Scale

Getting to ScaleBy building a scalable Architecture to

support your first 10M users

1. Dev & Test

2. Alpha Release

3. Beta Release

Production 1.0Architecture

Database OptionsSelf-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

Relational Database as a managed

service

Flexible licensing:BYOL or License

Included

But how do I choose what DB technology I need?

SQL? NoSQL?

Some folks won’t like this. But…

Start with SQL databases

But, but, but, but…

No. You don’t.

Start with SQL databases

Established and well worn technology

Lots of existing code, communities, books, tools, etc

Clear patterns to scalability

You aren’t going to break SQL DBs in your first 10 million users. No really, you won’t

Why SQL?

• Database-as-a-Service

• No need to install or manage database

instances

• Scalable and fault tolerant configurations

Feature Details

Platform support Create MySQL, SQL Server and Oracle

Preconfigured Get started instantly with sensible default settings

Automated patching

Keep your database platform up to date automatically

Backups Automatic backups and point in time recovery using snapshotsManual DB snapshots

Failover Automated failover to slave hosts in event of a failure

Replication Easily create read-replicas of your data and seamlessly replicate data across availability zones

Amazon Relational Database Service (RDS)

Automatic resizing of compute clusters based on demand

Trigger auto-scaling policy

Feature DetailsControl Define minimum and maximum instance pool

sizes and when scaling and cool down occurs.

Integrated to Amazon CloudWatch

Use metrics gathered by CloudWatch to drive scaling.

Instance types Run Auto Scaling for On-Demand and Spot Instances. Compatible with VPC.

as-create-auto-scaling-group MyGroup --launch-configuration

MyConfig--availability-zones us-

east-1a--min-size 4--max-size 200

Auto-Scaling Amazon CloudWatch

Production 1.0 Architecture

Production 1.0 Architecture

Well-designed, 2 Tier architecture

Highly Available due to Multiple Availability Zone

Load Balancing & Auto-Scaling for full scalability

Fully managed Database included

Capable of serving >10K-100Ks users

BUT…

Production 1.0 Architecture

Wasted server capacity for static content

Reliability and durability are not yet optimal

End-user experience could be improved thru offloading & caching

SO…

Let’s add

Simple Storage Service (S3)

CloudFrontto optimize the end-user experience

Durable storage, any object99.999999999% durability of objects

Unlimited storage of objects of any type

Up to 5TB size per object

Feature DetailsFlexible object store Buckets act like drives, folder structures within

Access control Granular control over object permissions

Server-side encryption 256bit AES encryption of objects

Multi-part uploads Improved throughput & control

Object versioning Archive old objects and version new ones

Object expiry Automatically remove old objects

Access logging Full audit log of bucket/object actions

Web content hosting Serve content as web site with built in page handling

Notifications Receive notifications on key events

Import/Export Physical device import/export service

Simple Storage Service (S3)

• World-wide content distribution network

• Easily distribute content to end users with low latency, high data transfer speeds, and no commitments

Feature DetailsFast Multiple world-wide edge locations to serve content as close to your users as possible

Integrated with other services Works seamlessly with S3 and EC2 origin servers

Dynamic content Supports static and dynamic content from origin servers

Streaming Supports rtmp from S3 and includes support for live streaming from Adobe FMS and Microsoft Media Server

CloudFront

Production 1.2 Architecture

Production 1.2 ArchitectureWell-designed, 2 Tier architecture

Highly Available due to Multiple Availability Zone

Load Balancing & Auto-Scaling for full scalability

Fully managed Database included

Static content stored in durable, consistent way

Improved end-user experience through CDN

Capable of serving >100K-1M+ users

BUT…

Production 1.2 Architecture

You are now at Scale…

…with lots of data…

…and need to optimize continuously.

But how and where?

SO…

Let’s add

Big Datafor analytics of web, mobile, gaming,

and log data

Multiple managed AWS services for Big Data

• Managed, elastic Hadoop cluster

• Integrates with S3 & DynamoDB

• Leverage Hive & Pig analytics scripts

Feature DetailsScalable Use as many or as few compute instances running Hadoop as you want. Modify the number of

instances while your job flow is running

Integrated with other services

Works seamlessly with S3 as origin and output. Integrates with DynamoDB

Comprehensive Supports languages such as Hive and Pig for defining analytics, and allows complex definitions in Cascading, Java, Ruby, Perl, Python, PHP, R, or C++

Cost effective Works with Spot instance types

Monitoring Monitor job flows from with the management console

Elastic MapReduce (EMR)

Foursquare…Founded in 2009112M in Venture Capital33 million users1.3 million businesses using the service

…generates a lot of Data3.5 billion check-ins 15M+ venues, Terabytes of log data

Uses EMR forEvaluation of new features

Machine learningExploratory analysis

Daily customer usage reportingLong-term trend analysis

Benefits of EMREase-of-Use

“We have decreased the processing time for urgent data-analysis”

FlexibilityTo deal with changing requirements & dynamically expand reporting clusters

Costs“We have reduced our analytics costs by over 50%”

Production 1.3 Architecture

Production 1.3 Architecture

Well-designed, 2 Tier architecture

Highly Available due to Multiple Availability Zone

Load Balancing & Auto-Scaling for full scalability

Static content stored in durable, consistent way

Improved end-user experience through CDN

Big Data analytics built in for continuous optimization

Capable of serving >1m-10M+ users

DEMOGetting to Scale

Thank Youaws.amazon.com/start-ups

amzn.to/1heA2Ei