📜 ⬆️ ⬇️

Load Testing “Quickly”

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

Instead of the preface


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

No - we were going to conduct load testing, of course, but not now, a little later, when there is more functionality, and it’s purely to make sure that everything is OK, or “not OK” in some specific places - and to edit them.
But then the question arose squarely - if everything is so bad - then some decisions must be made now - before it is too late. Only one conclusion - load testing gets a higher priority than other tasks.

Not "quick"


It was originally planned to go the standard way - take JMeter , write for a start a simple script to bypass the main pages with the basic functionality of an anonymous user - then improve little by little, at the same time solving questions how to correctly run this stuff on several client machines.
')
In general, the task is not for one hour

And quick?


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

In general, the most useful link on the topic of load testing was this - here are listed utilities like JMeter, and services for organizing testing. I will dwell on the first three

Very quick?


If it's very quick - then this is Load Impact - no registration is necessary - go in - give a URL - and within 10-15 minutes 50 virtual users terrorize your page. Stupidly, simply - but at least it will allow you to see that your application will not fall at the first flood. Did not lie down? Go ahead

1.5 hours load testing


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

Yes, 50 simultaneous users - this is not entirely serious - even it will not draw on the Hubro effect - 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 haven’t dream of in the next few months - so it was enough for me.

In general, the description of the script of 15 consecutive pages, waiting for the test to run and waiting for the results themselves took about an hour and a half, as a result I received graphs like
image
This graph 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 in 5 seconds (at this point, the Garbage Collector decided to turn on) - otherwise the application behaved well - and regardless of the number of users - that is - the site does not load a load of 50 users - there is also stock is good.

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

Slightly more authentic and more expensive


If you want a little more serious - you can try BrowseMob - I haven't tried them myself - the difference is that they, together with virtual users, are torturing your site with real ones - but it costs more. In any case, look - it can come in handy.

All good luck, happy habroeffektyov!

Source: https://habr.com/ru/post/77593/


All Articles