Slide 1

Slide 1 text

BUILDING SCALABLE WEB APPS

Slide 2

Slide 2 text

ABOUT ME Matías E. Fernández @matiasfrndz Head of Systems and Development

Slide 3

Slide 3 text

WHAT DOES “SCALABLE” MEAN?

Slide 4

Slide 4 text

≠ efficient usage of CPU ≠ efficient usage of bandwidth ≠ efficient usage of storage ≠ fast page loads in browser SCALABILITY ≠ PERFORMANCE

Slide 5

Slide 5 text

WTF?

Slide 6

Slide 6 text

SCALABILITY In electronics (including hardware, communication and software), scalability is the ability of a system, network, or process to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth. en.wikipedia.org/wiki/Scalability

Slide 7

Slide 7 text

VERTICAL VS. HORIZONTAL SCALABILITY

Slide 8

Slide 8 text

VERTICAL SCALING Bigger, faster, stronger!

Slide 9

Slide 9 text

HORIZONTAL SCALING Start small …

Slide 10

Slide 10 text

HORIZONTAL SCALING

Slide 11

Slide 11 text

HORIZONTAL SCALING Think BIG!

Slide 12

Slide 12 text

WHY BOTHER? Because web startups tend to die or grow … really big!

Slide 13

Slide 13 text

EXAMPLES

Slide 14

Slide 14 text

YOUTUBE • Founded in 2005 in a garage • Officially launched in December 2005 with 8 million videos watched per day • 100 million views a day in July 2006 • Over 4 Billion videos viewed per day in January 2012 • 72 hours of video uploaded every minute in May 2012 x 12 in
 7 month!

Slide 15

Slide 15 text

YOUTUBE 1 mio 10 mio 100 mio 1'000 mio 10'000 mio 2005 2006 2012 YouTube videos watched per day Notice the logarithmic scale, bro?

Slide 16

Slide 16 text

TWITTER • Founded in March 2006 • Officially launched in July 2006 • 400’000 tweets per quarter in 2007 • 100 million tweets per quarter in 2008 • 65 million tweets per day in June 2010 • 140 million tweets per day in March 2011, 1’600 tweets per second x 230 in
 12 month!

Slide 17

Slide 17 text

TWITTER 1'000 10'000 100'000 1'000'000 10'000'000 100'000'000 2007 2008 2010 Tweets per day Recognise the scale?

Slide 18

Slide 18 text

BETTER BE PREPARED Rewriting your web app to be scalable and at the same time scale it to accommodate
 a 10 to 100 fold of customers
 in 12 month? Sounds like a challenge!

Slide 19

Slide 19 text

PLAYING FOR TIME Strategies to Scaling out a Non-Scalable Web App Semi

Slide 20

Slide 20 text

KEEP THINGS SIMPLE Add caching reverse proxy to reduce the load on your web app and server HTTP Accelerator

Slide 21

Slide 21 text

WE ALL START SMALL Separate database and app server to gain CPU and I/O-performance App Server Database Server

Slide 22

Slide 22 text

LET’S START THE PARTY App Servers Redundant Load Balancer w. HTTP Acc. We still need our database

Slide 23

Slide 23 text

SCALE OUT vertically vertically horizontally

Slide 24

Slide 24 text

SINGLE POINT OF FAILURE They call me single point
 of failure

Slide 25

Slide 25 text

REDUCE SPOF 2-Node Failover
 Cluster highly availability ✔

Slide 26

Slide 26 text

Kundenname, Präsentationstitel Nine Internet Solutions AG Albisriederstr. 243a CH-8047 Zürich Tel +41 44 637 40 00 Fax +41 44 637 40 01 [email protected] QUESTIONS?

Slide 27

Slide 27 text

Kundenname, Präsentationstitel