Let's say that I have a web Application where i'm going to have 300 users and each one have to see data on real time, imagine that each client make an ajax call to the server to see in real time what's happens with the changes of the data, this calls are made each 300 ms per user. I know that i can run a simulation to see if the hardware of my server supports this example. But what happen's if the number of users start to grow up. Is there a way that i can measure the hardware needed to handle this growing behavior, a software, a formula, algorithm or maybe recommend me if i need to implement an distributed application with multiplies servers and balance the loads.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
My recommendation is just to test it. You'll learn more about the behaviour of your code that way.
If you want to do paper based, though, as a basic starter, you could extrapolate from your current results. Eg: if you use 20% CPU to do 1000 users, then 2000 users you might do 40% CPU. This breaks down very quickly though as it depends strongly on your application.
Next along is queueing theory and Markov chains. This gets a little statistical/mathematical but can give you some good insight into the system.
You could do Load Testing with something like Apache JMeter This would allow for far tests with heavy load and if you install it on several machines could test for concurrency. It's scriptable, so you could write very complex user interactions. I haven't used it for some time now, but remember, that it allowed for a lot of options how to test your website. Other alternatives are: Selenium, Watir, HtmlUnit, siege