"Quick" load testing

    Maybe someone will be interested in how to “quickly” conduct stress testing of their web application.
    Details under the cut

    Instead of the foreword


    At today's stand-up, Marek (a programmer from Poland participating in the EmForge project ) said that he talked with a number of friends who in the past had extensive experience working with Liferay (which we are actively using) - and the experience turned out to be very negative, primarily due to speed issues. Some projects were stupidly covered due to the fact that these problems could not be solved.

    No - of course we were going to carry out load testing, but not now, a little later, when there will be more functionality, and then, just to make sure that everything is OK, or "not OK" in some specific places - and edit them.
    But then the question arose - if everything is so bad - then some decisions must be taken now - before it is too late. There is only one conclusion - load testing gets a higher priority than other tasks

    Not "fast"


    Initially, it was planned to go the standard way - take JMeter , first write a simple script to crawl the main pages with the basic functionality by an anonymous user - then improve it little by little, simultaneously solving the issues of how to correctly run this stuff on several client machines.

    In general, the task is not for one hour

    A quick way?


    But then I remembered that there was an article on Habré (unfortunately I didn’t find the article - I would have thrown the link), where a person complained that people do not run load testing on their site, send a link to the hubr, and then, when you need to remove the “cream” "They painfully raise a site from the habra-effect (and users don’t see anything but error messages).
    So there someone advised several services that conduct such load testing.

    In general, this turned out to be the most useful link on the topic of load testing - utilities such as JMeter and testing organization services are listed here. on the first three I will stop a little more

    Quite fast?


    If it’s really quick - it’s Load Impact - you don’t need any registrations - go in - give the URL - and within 10-15 minutes 50 virtual users will terrorize your page. Stupidly, simply - but at least it will allow you to see that at the first influx your application will not lie down. Didn’t lie down? Move on

    Load testing in 1.5 hours


    I really liked LoadStorm . Work with him is structured as follows:
    1. register
    2. Create a test - which indicates the site that we will torture
    3. Before starting the torture - verification is required (what if you want to put a competitor's site ????). you need to put a certain text with the code on the main page - or a file with a specific name in the root
    4. Next, create a script - when creating a script, describe how the user goes to your site, which links clicks, you can submit forms. Everything is quite intuitive and understandable
    5. then we say when to start
    6. at the appointed time, the test starts, wait 30 minutes until up to 50 users roam your site according to your instructions - and we get a report.

    Yes, 50 simultaneous users - this is not entirely serious - even the habroeffect will not pull - but already something. We need more - there is a paid subscription (yes - I forgot to say that all this is free). In my case, 50 simultaneous users is the load that I don’t even dream about in the next few months, so I had enough.

    In general, it took about an hour and a half to describe the scenario of 15 consecutive pages, waiting for the test to start and waiting for the results themselves, as a result I got graphs like
    image
    This diagram shows how the system was tormented - in my case there were a maximum of 47 users - and a little more than 3 requests per second
    Well, the most interesting
    image
    From which it follows - that if you exclude the maximum peak of 5 seconds (at this moment Garbage Collector decided to turn on) - the rest of the application behaved well - and regardless of the number of users - that is, the load of 50 users does not load the site - there is also stock is good.

    It is clear that such testing is not entirely “serious” in terms of the results, and even 50 simultaneous users - it cannot be called a serious burden, but given the time spent (one and a half hours) and money (0 rubles), the result is quite adequate. At least we made sure that if there are any problems with the performance, in the coming months we still will not see it

    A little more authentic and more expensive


    If you want a little more serious - you can try BrowseMob - you haven’t tried them yourself - the difference is that they, together with virtual users, torment your site with real ones - but it costs more. In any case, take a look -

    Everything, good luck, happy habro-effects can come in handy !

    Also popular now: