ivo jansch - the art of scalability

23
http://www.egeniq.com [email protected] @egeniq Tweakers.net Developer Summit, March 24 2011 Ivo Jansch / @ijansch The Art of Scalability

Upload: tweakersnet-developer-summit

Post on 30-Nov-2014

705 views

Category:

Technology


0 download

DESCRIPTION

Tweakers.net Developer Summit - presentatie Ivo Jansch - The art of scalability.

TRANSCRIPT

Page 1: Ivo jansch - the art of scalability

http://[email protected]

@egeniq

Tweakers.net Developer Summit, March 24 2011Ivo Jansch / @ijansch

The Art of Scalability

Page 2: Ivo jansch - the art of scalability

What is Scalability?

“[...] Scalability is the ability of a system, network, or process, to handle growing

amounts of work in a graceful manner or its ability to be enlarged to accommodate that

growth.” - Wikipedia

2

Page 3: Ivo jansch - the art of scalability

Different levels of scale

3

Site Pageviews/month # Servers Views / server

Facebook 200B 30K 6.6M

Netlog 4B 600 6.6M

Hyves 6.5B 3000 2.1M

Tweakers 60M 15 4M

Nu.nl 340M 14 24M

(See end of slide deck for sources)

Page 4: Ivo jansch - the art of scalability

‣Content Delivery Network• http://www.akamai.com/

‣Search Engine• http://sphinxsearch.com/• (Also have a look at http://lucene.apache.org/solr/)

‣Database Replication

Some of the tools at Netlog

4

Page 5: Ivo jansch - the art of scalability

‣Caching• http://memcached.org/

‣Lightweight webserver• http://nginx.org/

‣Automated deployment• http://puppetlabs.com/

Some of the tools at Hyves

5

Page 6: Ivo jansch - the art of scalability

‣Content pre-generation

‣Varnish Edge Side Includes• http://www.varnish-software.com/

‣Distributed Job Queues• http://gearman.org/ *

* nu.nl uses a custom job queue but this is one I can recommend

Some of the tools at Nu.nl

6

Page 7: Ivo jansch - the art of scalability

Some of the tools at Facebook

‣PHP -> C++ compiler• https://github.com/facebook/hiphop-php

‣Distributed Logging• https://github.com/facebook/scribe

‣NoSQL Storage• http://cassandra.apache.org/

7

Page 8: Ivo jansch - the art of scalability

How can you scale?Start with the basics

8

Page 9: Ivo jansch - the art of scalability

Scaling with Hardware

If you run your app on multiple servers today, would it work?

Typical problem areas:‣ Sessions

‣ Files

9

Page 10: Ivo jansch - the art of scalability

Elasticity

10

Page 11: Ivo jansch - the art of scalability

A scalable funnel

Load balancer

11

WebServer

WebServer

WebServer

WebServer

WebServer

AppServer

AppServer

AppServer

Database Services

Load balancer

Load balancer

Page 12: Ivo jansch - the art of scalability

Logical/Functional partitioning

12

Page 13: Ivo jansch - the art of scalability

Scalable Architectures

‣Service Oriented Architecture

‣Component Based Design

‣Abstraction

13

Page 14: Ivo jansch - the art of scalability

Scalability in Software

‣Caching

‣Graceful Degradation

14

Page 15: Ivo jansch - the art of scalability

Food for ThoughtScaling Wisely

15

Page 16: Ivo jansch - the art of scalability

Food for thought

Remember, this talk is called:

“The Art of Scalability”

16

Page 17: Ivo jansch - the art of scalability

This is Art

17

“House of Stairs”M.C. Escher

Page 18: Ivo jansch - the art of scalability

But this is Art, too

18

“Composition with Blue”

Piet Mondriaan

Page 19: Ivo jansch - the art of scalability

Moral of this story

Scalability is about the ability to scale.

Don’t scale prematurely.

Keep it simple.

19

Page 20: Ivo jansch - the art of scalability

“You’re doing it wrong!”

“Scalability is the ability of a system, network, or process, to handle growing large amounts

of work in a graceful manner or its ability to be enlarged to accommodate that growth.”

20

Page 22: Ivo jansch - the art of scalability

Sources

The slide with servers and pageviews was based on:

‣ http://cns.ucsd.edu/lecturearchive09.shtml#Roth (Facebook)

‣ http://technologie.hyves.nl/ (Hyves)

‣ http://www.slideshare.net/folke/netlog-what-we-learned-about-scalability-high-availability-430211 (Netlog)

‣ http://www.slideshare.net/peter_ibuildings/surviving-a-plane-crash (Nu.nl)

‣ http://tweakers.net/reviews/331/5/tweakers-punt-net-faq-plans-stats-servers-en-site-software.html (Tweakers)

Page 23: Ivo jansch - the art of scalability

Credits

The following Creative Commons pictures were used in this presentation:

‣ ‘Datacenter Work’ by Leonardo Rizzi - http://www.flickr.com/photos/stars6/4381851322/

‣ ‘Rubber Band Man’ by Abe Novy - http://flickr.com/photos/thenovys/3791884189/

‣ ‘You’re doing it wrong’ by Adam Swank - http://www.flickr.com/photos/adeepbreath/3952587062/