1

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 happens if the number of users starts to grow up. Is there a way that I can measure the hardware needed to handle this growing behaviour, a software, a formula, algorithm or maybe recommend me if I need to implement a distributed application with multiplies servers and balance the loads.

2 Answers 2

3

My recommendation is just to test it. You'll learn more about the behaviour of your code that way. To perform the testing, there are a wide variety of synthetic load testing tools - my personal preference is Gatling, but JMeter, golang's "hey" tool, and others exist to support this.

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.

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.