7 Stages of Scaling Web Applications
slideshare.net
slideshare.net
Having only a single web server, database server, and static content server while making liberal use of caching and smart querying result in benchmarks indicating we can sustain around 1900 req/sec. Even if that isn't entirely accurate, the chances of us reaching the 82 million page views per month to find out is all but inconceivable.
Typically dynamic content usually is well below 300 req/s per core and goes down fast on many factors (e.g. non-local database.) Most web frameworks are usually below the 300 req/s mark. Of course it is a very complex subject as there are many things to consider. Good cache management, CDN, SSI, and reverse cache come to mind.
About databases, it can become a problem if you do writes on the same database as locking starts to show its dangerous tentacles.
The other scaling point is concurrency. You can't (for example) serially add features to a page. Eventually that page will simply take too long to render.
A lot of "dashboard" pages suffer from this problem. If you reach that stage you need to start thinking about decoupling features - using things like messaging.
PS: This is a presentation by Rackspace of course they are going to say write bad software and buy lot's of hardware.
Scale is getting higher throughput by adding resources - Performance is getting higher throughput using the resources you already have.
Scaling is more about a product's ability to easily grow and handle an increasing amounts of work, rather than it's ability to render/dish out pages.
What I meant to say was concurrency is a way of distributing load and getting scalability.... But, yeah, you're right - my example was terrible/inaccurate.
If a any single component is a critical bottleneck the best is to either replace it or redesign to stop requiring it.
Same goes for the more memory approach.
So I think its often reasonable to pay the exorbitant prices as a stopgap before you can start doing any of the more complex scalability re-architecturing.
Its addictive also to spend all your time thinking about scalability and sharding and clustering options instead of making something people use.
In summary: yes, but be pragmatic about these things. If you are the only user, scaling might not be worth it. If you know that people will be using a feature all the time, think about caching from the get-go. Obviously figuring out which of the cases you are in can sometimes be tricky. ;)
Its addictive also to spend all your time thinking about scalability and sharding and clustering
options instead of making something people use.
I never proposed that. But leaving doors open for possible alternatives and quick fixes doesn't take much time, maybe 5 minutes of thinking. Sane programming methodologies help, like modularization and partitioning your code in different processes. Scalability and rapid development are not always mutually exclusive.I haven't used CVS in at least 5 years, and I've never even seen RCS in use. Part of me wonders if RCS is Rackspace's secret weapon.