What should I consider when taking an application (web) from a few users to hundreds or thousands? Basically, what should I be considering when thinking about escalating?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
In general, when we talk about scalability, it's more about going from few thousands to few millions or billions of requests. In such case, scalability requires an application to work on several servers, which has some very specific issues which scalability tends to solve.
In your case on the other hand, it seems that you just has to face the increase of users, without being forced to use several servers instead of one (unless the current server is pretty slow, in which case the upgrade must be considered, or the website has an impact on the resources of the server, in which case the bottlenecks have to be found and removed).
There are several points to consider in your case:
You can decrease the load of your database if you denormalize it, but you should benchmark it.
For Java you can decrease the stacksize using parameters to the JVM, because the amout of available memory may be a bottleneck if you have many concurrent users. It can also be interesting to change to an event-driven server e.g. Netty if your server uses much memory for servlets. Play Framework is an interesting Java web framework for Netty.
When using PHP you should use APC or Memcached for speedup.
You should also consider using Varnish for caching your requests.
The most important piece of your infrastructure to consider when scaling up (assuming you have a decently functioning software stack) is the physical layout. That is do you have multiple web servers, sitting behind load balancers? Do you have clustered app and db servers? Are you sitting on a dedicated network isolated from dev and qa? These are some of the things to focus on.