architecting for the cloud - jaoo.dkjaoo.dk/dl/qcon-sanfran-2009/slides/adamwiggins... ·...

Post on 23-May-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Adam WigginsQCon 2009

Horizontal Scalabilityvia Transient, Shardable,Share-Nothing Resources

Architecting for the Cloud

Thursday, November 19, 2009

Thursday, November 19, 2009

Heroku is home to over 40,000 applications

Thursday, November 19, 2009

Automatically scaling apps - without code changes

Thursday, November 19, 2009

Enabling factors:

Thursday, November 19, 2009

Enabling factors:

•Virtualization

Thursday, November 19, 2009

Enabling factors:

•Virtualization•Cloud (virtualization as a service)

Thursday, November 19, 2009

Cloud is about horizontal scalability

Thursday, November 19, 2009

Scale out instead of up to avoid the ceiling of Moore’s law

Thursday, November 19, 2009

Taking advantage of cloud:shardable resources

Thursday, November 19, 2009

Resources, aka software infrastructure:•Database•Caching•HTTP router•Message bus

Thursday, November 19, 2009

The father of modern shardable resources:

memcached

Thursday, November 19, 2009

“hashtable in the sky”

Thursday, November 19, 2009

Built by one of the first web-scale produts: LiveJournal

Thursday, November 19, 2009

Facebook:800 memcached servers supplying 28 terrabytes of memory

http://www.facebook.com/note.php?note_id=39391378919

Thursday, November 19, 2009

Pricinples

•Transient•Shardable•Share-nothing

Thursday, November 19, 2009

Any node in the cluster can be lost

Transient

Thursday, November 19, 2009

Client lookup by hashring

Shardable

Thursday, November 19, 2009

Thursday, November 19, 2009

Nodes are unaware of each other

Share nothing

Thursday, November 19, 2009

Is memcached is cheating?

Thursday, November 19, 2009

CouchDB

Thursday, November 19, 2009

CouchDB

•Document database

Thursday, November 19, 2009

CouchDB

•Document database•Eventual consistency

Thursday, November 19, 2009

CouchDB

•Document database•Eventual consistency •MVCC

Thursday, November 19, 2009

Eventually consistent

Thursday, November 19, 2009

Multiversion concurrency control instead of locking

Thursday, November 19, 2009

Comparable to a distributed source control system

Thursday, November 19, 2009

No master server

Transient

Thursday, November 19, 2009

Clients can go to any server

Shardable

Thursday, November 19, 2009

Nodes communicate only when asked to replicate

Share nothing

Thursday, November 19, 2009

CouchDB:The DefinitiveGuide

http://books.couchdb.org/relax/

Thursday, November 19, 2009

Hadoop big data processing

•MapReduce•Cut big data into small chunks•Cut big work into distributable jobs

http://hadoop.apache.org/

Thursday, November 19, 2009

Redis key-value store

•Like memcached with persistence•Shards with hashring•Lists and sets•Extremely fast and lightweight

http://code.google.com/p/redis/

Thursday, November 19, 2009

Varnish http cache

•Like Squid, but horizontally scalable•Combine with ngx_http_upstream_consistent_hash for hashring-style access

http://wiki.nginx.org/NginxHttpUpstreamConsistentHash

http://varnish.projects.linpro.no/

Thursday, November 19, 2009

RabbitMQ message bus

•Job queueing•Cluster broadcast via exchanges•Cross-language

http://www.rabbitmq.com/

Thursday, November 19, 2009

Erlang functional language

•High concurrency•No mutable variables•Lightweight processes

http://www.erlang.org/

Thursday, November 19, 2009

Horizontal scalability promises to shatter the glass ceiling of vertical scale

Thursday, November 19, 2009

...but only if we architect resources to be transient, shardable, and share-nothing

Thursday, November 19, 2009

The End.

Adam Wigginshttp://adam.blog.heroku.com

http://heroku.com

Thursday, November 19, 2009

top related