

Any suggestions on what one should think about when scaling a site? - amrithk

Hi All, 
Does anyone know a good resource (website, book, etc) on things to think about when scaling a website? For instance, I am looking for materials on:<p>1) How a scalable website is organized in terms of infrastructure (having a database server, having a web server, etc)?<p>2) Best practices for designing the database for a large website to prevent single-points-of-failure<p>3) What web services out there allow for easy scaling. I have heard of slicehost, Mosso, EC2, Google App Engine (any others? We use PHP)? Do you have to configure your own load balancer etc for these services?<p>4) Other useful things to think about when designing a scalable web application.<p>Thanks all
======
rit
<http://highscalability.com/> has some fantastic articles.

The best tool to learn how to use is memcached - it has clients in most major
languages (And even some obscure ones) and when used properly can remove a lot
of the typical problems for you. Part of what I found with memcached is that
it forces you to think in terms of encapsulated data. Instead of thinking
about your database all the time, the database becomes a tool. What's more
important however is consumable bite sized chunks of data that your
application is using, and finding ways to get to them quickly.

Stay away from apache: it's far to slow and unwieldy for most scaling. I'm a
huge fan of LigHTTPD (<http://lighttpd.net>) but a lot of people also swear by
Nginx (<http://nginx.net>).

Depending on your language... find ways to tune away any of the runtime
slowdowns such as translation to byte code. With PHP find a byte code cacher,
learn it tune and and rely upon it. The LigHTTPD guys make a great cacher
called XCache (<http://xcache.lighttpd.net>) which I've used on a few big
sites. It plays nice with Lighttpd and is actively maintained.

~~~
amrithk
Great. These should help me get started.

