views:

1121

answers:

9

How to design/architect a scalable application? Any suggestion of books or websites that could help to understand how to scale out application?

Thanks

A: 

I would suggest this book for that:

http://www.amazon.com/Scalable-Internet-Architectures-Developers-Library/dp/067232699X/ref=sr_1_1?ie=UTF8&s=books&qid=1243267630&sr=8-1

Even though this is primarily a PHP book, the ideas are the same for any web stack.

Tommy Hui
I agree, though I wouldn't characterize this as a PHP book. It has significant examples in Perl, Oracle PL/SQL and other languages, and there's also a lot of high level material, such as Chapter 5 on load balancing (no code samples), and Chapter 6 on static content serving (one small PHP snippet). One criticism I've seen is that he focuses too much on the Johns Hopkins Spread library, but overall people in the high scalability community rave about it.
Jim Ferrans
A: 

Before you start with technique you should know the application scope dead cold. What does the customer / business unit expect in terms of performance, and what are the critical areas of failure? Scott Hanselman had a great podcast regarding the subject.

Some of tidbits offered: don't use caching unless you have to; serving up files is faster than assembling fragments from a database; know how to handle peek server times; know what your peaks will be.

Again, know the scope of the usage first in order to know if you should scale.

David Robbins
A: 

This is exactly what you need! Application Architecture Guide was created by Microsoft Patterns and Practices team to help architects...

Pavel Nikolov
+4  A: 

Over the past year I've had to come up to speed on this question for a project my company's working on, and I've found these resources extremely helpful: Todd Hoff's highscalability.com; Scalable Internet Architectures, by Theo Schlossnagle; and Building Scalable Web Sites, by Cal Henderson. Highscalability.com in particular will point you to many good presenations, tutorials, books, and papers, and is a great place to start. All of the advice is practical, and based on experience at sites like Flickr, Twitter, and Google.

BTW, scalability is not performance. A perfectly scalable system is one that has a fixed marginal cost to add additional users or capacity.

Jim Ferrans
Nice resources you pointed out there!
Simucal
oh scalability advice from twitter, must be good .. ;)
Jonatan
Hah, I could have picked a better example, I guess! ;-) But Twitter had to fight hard to get past their growing pains. See http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster.
Jim Ferrans
A: 

This is a good intro to the subject: IBM developerWorks had a couple of interesting tutorials about using architecture patterns for applications that scale: here and here.

ivo
A: 
  • I tend to think that scalability is closely related to maintainability. And it seems to be often overlooked that people spend only a short time developing applications and the rest of the time maintaining it.

  • Also, scaling has almost certainly to do with data (which is more agile than code - so you like to have more and more of it), thats why your storage access cost should stay between O(1) or O(n).

  • The perfectly scalable application for me is one that I could copy from an environment to another (similar) environment, configure a few values and run it to extend the execution realm of the whole application.

The MYYN
A: 

There are already some great answers posted here. In some of the books and links you will find a few common thinking patterns.

  • Write as little code as possible

  • Reuse code as much as possible

  • Don't over, or under abstract your design

  • Break things into modular areas that can run on seperate, or multiple systems. Heavy processing should be left to a seperate system.

Jas Panesar
+2  A: 

This is a nice read on livejournal and how they've scaled their application over time.

danga.com/words/2004_mysqlcon/mysql-slides.pdf[PDF]

It might not be the sort of thing you're looking for, but it's one of the better "This is what we did and why" overviews on scaling.

JensenDied
+1 This walks through the whole process from starting with one machine up through sharding a large site into user-clusters. Their 2007 presenation is here: http://www.scribd.com/doc/39892/Website-Scalability-LiveJournal-Behind-The-Scenes-2007
Jim Ferrans
A longer version of the 2007 presentation: http://www.danga.com/words/2007_04_linuxfest_nw/linuxfest.pdf ver
Jim Ferrans
A: 

Whatever you do you cannot design the system right from the start to be scalable for all your needs. Often once you have your system running you will find bottlenecks where you least expect them (ie: local network bandwidth). Anyway, my advice is definitely highscalability.com as well :)

Zubair