scalr: setting up automated scaling

20

Click here to load reader

Upload: hakka-labs

Post on 10-May-2015

349 views

Category:

Technology


1 download

DESCRIPTION

Despite all the buzz about it, building a horizontally scalable application for cloud deployment isn't all that different from building one for a physical deployment, except in its ability to change size on-the-fly. Bigger applications have been using commodity hardware and fault-tolerant design to achieve high availability and scalability for a while, but provisioning capacity remains troublesome there. The real addition the cloud brings architecturally is the ability to add new resources instantly, and even change your provisioning profile algorithmically.

TRANSCRIPT

Page 1: Scalr: Setting Up Automated Scaling

A brief history of auto-scaling

Lessons learned from 5 years of it

Page 2: Scalr: Setting Up Automated Scaling

some context

First,

Page 3: Scalr: Setting Up Automated Scaling

About me

● Sebastian Stadil

● Founder of meetup.com/cloudcomputing

● Founder of Scalr

[email protected]

● Slashdotted at 14

Page 4: Scalr: Setting Up Automated Scaling

About

● Simple, powerful cloud management suite

● Helps you design & manage resilient,

scalable infrastructure

● For apps deployed in public & private clouds

● Over 2,000,000 instances launched

● Applications vary from 1 to 10,000 instances

● Started out as simple auto-scaling system

Page 5: Scalr: Setting Up Automated Scaling

our feature presentation

And now

Page 6: Scalr: Setting Up Automated Scaling

A brief history of auto-scaling

Lessons learned from 5 years of it

Page 7: Scalr: Setting Up Automated Scaling

● Combination of CPU, disk IO, number of

processes running

● Represents system utilization.

● Good for most applications.

● Most widely used.

Load Average

Page 8: Scalr: Setting Up Automated Scaling

CPU

● Good for services with dominant CPU consumption (duh)

● Data processing, video processing, etc..

Page 9: Scalr: Setting Up Automated Scaling

Response times

● Rarely used metric

● Many factors screw it up (network

throughput, system resources, different

application queues)

● When response only depends on hardware,

can work

● Downscaling is problematic

Page 10: Scalr: Setting Up Automated Scaling

RAM

● Good for RAM based databases and caches

● Beware of invalidating keys

● Memcached, Redis, etc.

Page 11: Scalr: Setting Up Automated Scaling

Schedule

● Good for services with predictable traffic

● Advertising campaigns, product launches

● When you know that you will get extra traffic

at specific time or day

● When traffic changes throughout the day

Page 12: Scalr: Setting Up Automated Scaling

Queue size

● Maintain processing rate, esp. SLA*

*Processing rate = queue size / servers (given that each server can process X tasks per hour).

● Good for processing services such as video

encoding or sending messages

Page 13: Scalr: Setting Up Automated Scaling

Bandwidth

● Limited channel per server (1Gbit anyone?)

● Need higher download capacity

● Known traffic per user

Page 14: Scalr: Setting Up Automated Scaling

Disk io

● Cassandra

● Certain Hadoop jobs

● Stuff that hits the disk

Page 15: Scalr: Setting Up Automated Scaling

Build your own algorithms

Fuck it

Page 16: Scalr: Setting Up Automated Scaling

Custom metrics

● Read a file

● Execute a script

● Example: # of threads / connections

Page 17: Scalr: Setting Up Automated Scaling

Custom algorithms

● OR for upscaling

● AND for downscaling

● Configurable cooldowns

● Configurable steps

● Example: scale up early, scale down slowly

Page 18: Scalr: Setting Up Automated Scaling

Examples

● Social gaming

● Enterprise services

Page 19: Scalr: Setting Up Automated Scaling

Another example (mysql)

● Take master out

● Take backing up slave out

Page 20: Scalr: Setting Up Automated Scaling

Started with general, went specific,then went custom

Summary