You are on page 1of 30

Pool Party!

Autoscaling on EC2 EC2 for the criminally lazy autoElastic cloud computing on EC2

Ari Lerner – CitrusByte

Pool Party! Autoscaling on EC2 EC2 for the criminally lazy autoElastic cloud computing on EC2 Ari

Amazon’s EC2

What

Clustered, web-service

Easy scaled computing

Completely

customizable

Pay for only what you use

Highly elastic

Incredibly flexible

Issues

No auto-scaling

No load-balancing

Non-persistent instance data storage

Volatile with no failover solution

• No load-balancing • Non-persistent instance data storage • Volatile with no failover solution

Pool Party

Self-healing computing clusters

Auto-scales cloud based on user-configured parameters

Inherent load-balancing

Persistent data storage on instances using s3

Failover safety

CloudSpeak DSL – easily communicate with your cloud

data storage on instances using s3 • Failover safety • CloudSpeak DSL – easily communicate with

How?

Load Balancing Haproxy
Load Balancing
Haproxy
Fail safety Heartbeat
Fail safety
Heartbeat
How? Load Balancing Haproxy Fail safety Heartbeat

How?

Persistent data storage S3F(use)
Persistent data
storage
S3F(use)
Auto-scaling PoolParty
Auto-scaling
PoolParty
How? Persistent data storage S3F(use) Auto-scaling PoolParty

*nix

HAProxy

This application-agnostic, hot-swappable load-balancer built from the ground up for high availability clusters is speedy because of it’s closeness to the os.

load-balancer built from the ground up for high availability clusters is speedy because of it’s closeness

Heartbeat

Robust, enterprise-standard services monitor that provides pool party failover capabilities.

S3Fs

S3 backed filesystem in userspace (FUSE) uses little-to-no caching to reduce race conditions. Pool party uses the unlimited s3 data-store to provide instances access to the same data across the instances while providing an easy deployable.

s3 data-store to provide instances access to the same data across the instances while providing an

Load Balancing

node2 node1 Master node0 Web server/DB Server/ Memcached server/local machine request, etc.
node2
node1
Master
node0
Web server/DB Server/
Memcached server/local
machine request, etc.
Load Balancing node2 node1 Master node0 Web server/DB Server/ Memcached server/local machine request, etc.

Failover (instance)

node1 node2 Master node0
node1
node2
Master
node0
Failover (instance) node1 node2 Master node0

Failover (instance)

node1 node2 Master node0
node1
node2
Master
node0
Failover (instance) node1 node2 Master node0

Failover (instance)

node2 node1 Master node0
node2
node1
Master
node0
Failover (instance) node2 node1 Master node0

Failover (master)

node1 node2 Master node0
node1
node2
Master
node0
Failover (master) node1 node2 Master node0

Failover (master)

node1 node2 Master node0
node1
node2
Master
node0
Failover (master) node1 node2 Master node0

Failover (master)

Master node0 node0 node1
Master
node0
node0
node1
Failover (master) Master node0 node0 node1

Persistent data store

S3:/your_bucket node1 node2 Master node0
S3:/your_bucket
node1
node2
Master
node0
Persistent data store S3:/your_bucket node1 node2 Master node0

Auto-scaling

node1 node2 Master node0
node1
node2
Master
node0
Can serve 0.23 req/sec and cpu load is 0.70
Can serve 0.23
req/sec and cpu
load is 0.70
Can serve 20.1 req/sec and cpu load is 0.95
Can serve 20.1
req/sec and cpu
load is 0.95
Can serve 3.8 req/sec and cpu load is 0.72
Can serve 3.8
req/sec and cpu
load is 0.72
Average req/sec = 8.04 Average cpu load = 0.77
Average req/sec = 8.04
Average cpu load = 0.77

Auto-scaling

Can serve 0.23 req/sec and cpu load is 0.70 node1 Can serve 20.1 req/sec and
Can serve 0.23
req/sec and cpu
load is 0.70
node1
Can serve 20.1
req/sec and cpu
load is 0.95
node2
Master
node0
Can serve 3.8
req/sec and cpu
load is 0.72
Average req/sec = 8.04
Average cpu load = 0.77
HEAVY
LOAD!!!
node0 Can serve 3.8 req/sec and cpu load is 0.72 Average req/sec = 8.04 Average cpu

Auto-scaling

Can serve 20.1 req/sec and cpu load is 0.35 node3 Can serve 12.2 req/sec and
Can serve 20.1
req/sec and cpu
load is 0.35
node3
Can serve 12.2
req/sec and cpu
load is 0.50
node1
node2
Can serve 20.1
req/sec and cpu
load is 0.35
Master
node0
Can serve 10.2
req/sec and cpu
load is 0.45
node1 node2 Can serve 20.1 req/sec and cpu load is 0.35 Master node0 Can serve 10.2

Auto-scaling

node3 node1 node2 Master node0
node3
node1
node2
Master
node0
Phew! Load is back to normal
Phew! Load is back to normal
Can serve 20.1 req/sec and cpu load is 0.35
Can serve 20.1
req/sec and cpu
load is 0.35
Can serve 12.2 req/sec and cpu load is 0.50
Can serve 12.2
req/sec and cpu
load is 0.50
Can serve 20.1 req/sec and cpu load is 0.35 Can serve 10.2 req/sec and cpu
Can serve 20.1
req/sec and cpu
load is 0.35
Can serve 10.2
req/sec and cpu
load is 0.45
req/sec and cpu load is 0.50 Can serve 20.1 req/sec and cpu load is 0.35 Can

CloudSpeak

pool

start | stop | restart | list | maintain

instance

start | stop | reconfigure | install | ssh | scp | cmd | start_maintain | stop_maintain

| maintain • instance • start | stop | reconfigure | install | ssh | scp

Usage example

Usage example

Start with rake dev:setup source ~/.key_pool_keys

Start with rake dev:setup source ~/.key_pool_keys
Start with rake dev:setup source ~/.key_pool_keys

pool start

pool start
pool start

pool list

pool list

instance ssh

instance ssh
instance ssh

pool stop

pool stop
pool stop

Upcoming features

in development

Speeding up configuration-time

Plugin and extensible support

Front-end client

Monitor logging

Capistrano deployment

• Plugin and extensible support • Front-end client • Monitor logging • Capistrano deployment

Questions?

Questions?

Thanks

Thanks