Live data from Hacker News

How do you scale your web application?

news.ycombinator.com

21–30 of 41 posts

Re: How do you scale your web application?

#23
post #19

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

What would be the first thing you do? All that adds up...

first thing to do, IMO: Add more RAM

Re: How do you scale your web application?

#24
What are the effective strategies to use when the bottleneck is disk I/O? We have memcached to cache data that is frequently accessed. However our usage pattern is such that repeated access of data in a short span of time is rare.

Re: How do you scale your web application?

#26
post #16

We scale Streamfile.com with Erlang. Both front & back-end. Check out: http://www.erlang-web.org/

Adding lots of application servers isn't the hard part, generally (from what I've read... I have to admit I've never had to do more than the 'easy stuff'). The database is. How's Mnesia scale up? Where does it work well, and where does it not work so well?

If you find it difficult to scale up databases, try looking at CouchDB instead http://couchdb.apache.org/index.html

Re: How do you scale your web application?

#27
post #17

Mini-guide to scaling your app: Step 1. Measure, measure, measure: response time, page load time, query time Step 2. Identify bottlenecks: Why isn't your page load snappy? Too much JS? Round-trip to DB is killing you? Your mongrels are overloaded? Tip: Use YSlow for frontend measurements and take most of its advice Step 3. Fix bottlenecks: Lots of techniques to fix faster frontend performance, start with YSlow above.…

Most the stuff you mention is about performance, not scaling. It's (mostly) good advice but doesn't address the original question at all.

Re: How do you scale your web application?

#28
post #19

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

What would be the first thing you do? All that adds up...

Depends on your app, but...

Split static content serving from dynamic. Can start off on same server but requirements for each are so different it pays to have tuned processes serving each.

Build customized, svelt apache or use nginx.

Get separate DB server, get lots mem for DB server, tune DB to use that memory. Few/None are setup up out of box to use 4-8GB+ well.

Get more mem for http box(es), use memcache/similar to take advantage of that memory.

Re: How do you scale your web application?

#30
horizontally (keep adding cache and load balancers/proxies). all you have to do is keep making more profits and keep buying more hardware into infinity.

sure, one day you'll have to build a nuclear reactor and tap a dam to provide all the power and cooling for the datacenter space, but it's easier than a redesign.

Post reply on HN