27
Kundenname, Präsentationstitel

Building Scalable Web Apps

Embed Size (px)

DESCRIPTION

Strategies to Scaling out a Non-Scalable Web App

Citation preview

Page 1: Building Scalable Web Apps

Kundenname, Präsentationstitel

Page 2: Building Scalable Web Apps

BUILDING SCALABLE WEB APPS

Page 3: Building Scalable Web Apps

ABOUT ME

Matías E. Fernández @matiasfrndz

Head of Systems and Development

Page 4: Building Scalable Web Apps

WHAT DOES “SCALABLE” MEAN?

Page 5: Building Scalable Web Apps

≠ efficient usage of CPU

≠ efficient usage of bandwidth

≠ efficient usage of storage

≠ fast page loads in browser

SCALABILITY ≠ PERFORMANCE

Page 6: Building Scalable Web Apps

WTF?

Page 7: Building Scalable Web Apps

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

Page 8: Building Scalable Web Apps

VERTICAL VS. HORIZONTAL SCALABILITY

Page 9: Building Scalable Web Apps

VERTICAL SCALING

Bigger, faster, stronger!

Page 10: Building Scalable Web Apps

HORIZONTAL SCALING

Start small …

Page 11: Building Scalable Web Apps

HORIZONTAL SCALING

Page 12: Building Scalable Web Apps

HORIZONTAL SCALING

Think BIG!

Page 13: Building Scalable Web Apps

WHY BOTHER?

Because web startups tend to die

or grow … really big!

Page 14: Building Scalable Web Apps

EXAMPLES

Page 15: Building Scalable Web Apps

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 in7 month!

Page 16: Building Scalable Web Apps

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?

Page 17: Building Scalable Web Apps

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 in12 month!

Page 18: Building Scalable Web Apps

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?

Page 19: Building Scalable Web Apps

BETTER BE PREPARED

Rewriting your web app to be scalable

and

at the same time scale it to accommodatea 10 to 100 fold of customers

in 12 month?

Sounds like a challenge!

Page 20: Building Scalable Web Apps

PLAYING FOR TIMEStrategies to Scaling out a Non-Scalable Web App

Semi

Page 21: Building Scalable Web Apps

KEEP THINGS SIMPLE

Add caching reverse proxy to reduce theload on your web app and server

HTTP Accelerator

Page 22: Building Scalable Web Apps

WE ALL START SMALL

Separate database and app server to gainCPU and I/O-performance

App Server

Database Server

Page 23: Building Scalable Web Apps

LET’S START THE PARTY

App Servers

Redundant Load Balancerw. HTTP Acc.

We still needour database

Page 24: Building Scalable Web Apps

SCALE OUT

vertically

verticallyhorizontally

Page 25: Building Scalable Web Apps

SINGLE POINT OF FAILURE

They call me single pointof failure

Page 26: Building Scalable Web Apps

REDUCE SPOF

2-Node FailoverCluster highly availability

Page 27: Building Scalable Web Apps

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?