Live data from Hacker News

How do you scale your web application?

news.ycombinator.com

1–10 of 41 posts

Re: How do you scale your web application?

#8
post #2

Do the easy stuff first: 1. Enable caching & get the HTTP-headers with e-tags and stuff. 2. Get DB schema with proper indexes & tune database settings. 3. Buy better hardware where there are bottlenecks 4. Fix the software ;)

A point on 4: Find or, in very extreme circumstances, write your own very lightweight profiler you can run on production servers. This will be a life-saver.

The bottlenecks are very rarely where you think they are. Even when they are, there is typically lots of low hanging fruit hanging around that you don't know about until you profile.

Also, you should have some sort of monitoring software running aggregating stuff like server loads, connection stats, number of db requests, memcached hits/misses, etc. Cacti I find quite good for this.

Re: How do you scale your web application?

#9

After the easy stuff: move your database to its own server, add a load balancer in front of additional web servers, implement memcached, start splicing your database to multiple servers, continue to add web servers, serve your static files from a cdn

also

1. caching is your friend

2. you probably need 2 load balancer (instead of 1) for high availability

3. probably need a SAN or shared storage somewhere when you have several web servers

Re: How do you scale your web application?

#10
post #2

Do the easy stuff first: 1. Enable caching & get the HTTP-headers with e-tags and stuff. 2. Get DB schema with proper indexes & tune database settings. 3. Buy better hardware where there are bottlenecks 4. Fix the software ;)

I disagree with "buy better hardware" (unless you are thinking of just additional RAM or getting a SSD instead of a regualar hardware)

imho you need to design with horizontal scaling in mind

Post reply on HN