Architecting for the Cloud Horizontal Scalability via Transient, - - PowerPoint PPT Presentation

architecting for the cloud
SMART_READER_LITE
LIVE PREVIEW

Architecting for the Cloud Horizontal Scalability via Transient, - - PowerPoint PPT Presentation

Architecting for the Cloud Horizontal Scalability via Transient, Shardable, Share-Nothing Resources Adam Wiggins QCon 2009 Thursday, November 19, 2009 Thursday, November 19, 2009 Heroku is home to over 40,000 applications Thursday,


slide-1
SLIDE 1

Adam Wiggins

QCon 2009 Horizontal Scalability via Transient, Shardable, Share-Nothing Resources

Architecting for the Cloud

Thursday, November 19, 2009

slide-2
SLIDE 2

Thursday, November 19, 2009

slide-3
SLIDE 3

Heroku is home to over 40,000 applications

Thursday, November 19, 2009

slide-4
SLIDE 4

Automatically scaling apps - without code changes

Thursday, November 19, 2009

slide-5
SLIDE 5

Enabling factors:

Thursday, November 19, 2009

slide-6
SLIDE 6

Enabling factors:

  • Virtualization

Thursday, November 19, 2009

slide-7
SLIDE 7

Enabling factors:

  • Virtualization
  • Cloud (virtualization as a service)

Thursday, November 19, 2009

slide-8
SLIDE 8

Cloud is about horizontal scalability

Thursday, November 19, 2009

slide-9
SLIDE 9

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

Thursday, November 19, 2009

slide-10
SLIDE 10

Taking advantage of cloud: shardable resources

Thursday, November 19, 2009

slide-11
SLIDE 11

Resources, aka software infrastructure:

  • Database
  • Caching
  • HTTP router
  • Message bus

Thursday, November 19, 2009

slide-12
SLIDE 12

The father of modern shardable resources: memcached

Thursday, November 19, 2009

slide-13
SLIDE 13

“hashtable in the sky”

Thursday, November 19, 2009

slide-14
SLIDE 14

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

Thursday, November 19, 2009

slide-15
SLIDE 15

Facebook: 800 memcached servers supplying 28 terrabytes of memory

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

Thursday, November 19, 2009

slide-16
SLIDE 16

Pricinples

  • Transient
  • Shardable
  • Share-nothing

Thursday, November 19, 2009

slide-17
SLIDE 17

Any node in the cluster can be lost Transient

Thursday, November 19, 2009

slide-18
SLIDE 18

Client lookup by hashring Shardable

Thursday, November 19, 2009

slide-19
SLIDE 19

Thursday, November 19, 2009

slide-20
SLIDE 20

Nodes are unaware of each other Share nothing

Thursday, November 19, 2009

slide-21
SLIDE 21

Is memcached is cheating?

Thursday, November 19, 2009

slide-22
SLIDE 22

CouchDB

Thursday, November 19, 2009

slide-23
SLIDE 23

CouchDB

  • Document database

Thursday, November 19, 2009

slide-24
SLIDE 24

CouchDB

  • Document database
  • Eventual consistency

Thursday, November 19, 2009

slide-25
SLIDE 25

CouchDB

  • Document database
  • Eventual consistency
  • MVCC

Thursday, November 19, 2009

slide-26
SLIDE 26

Eventually consistent

Thursday, November 19, 2009

slide-27
SLIDE 27

Multiversion concurrency control instead of locking

Thursday, November 19, 2009

slide-28
SLIDE 28

Comparable to a distributed source control system

Thursday, November 19, 2009

slide-29
SLIDE 29

No master server Transient

Thursday, November 19, 2009

slide-30
SLIDE 30

Clients can go to any server Shardable

Thursday, November 19, 2009

slide-31
SLIDE 31

Nodes communicate

  • nly when asked to

replicate Share nothing

Thursday, November 19, 2009

slide-32
SLIDE 32

CouchDB: The Definitive Guide

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

Thursday, November 19, 2009

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

slide-35
SLIDE 35

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

slide-36
SLIDE 36

RabbitMQ

message bus

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

http://www.rabbitmq.com/

Thursday, November 19, 2009

slide-37
SLIDE 37

Erlang

functional language

  • High concurrency
  • No mutable variables
  • Lightweight processes

http://www.erlang.org/

Thursday, November 19, 2009

slide-38
SLIDE 38

Horizontal scalability promises to shatter the glass ceiling of vertical scale

Thursday, November 19, 2009

slide-39
SLIDE 39

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

Thursday, November 19, 2009

slide-40
SLIDE 40

The End.

Adam Wiggins http://adam.blog.heroku.com http://heroku.com

Thursday, November 19, 2009