Why load testing is critical for your business
Traffic spikes often happen in critical situations for your business: go-lives of your applications, Black Fridays, national TV appearances, tickets sales opening, online events.
By simulating complex users’ behaviors and peaks of traffic, you analyze your application’s performances, precisely identify its bottlenecks, and increase its capacity.
A performance bottleneck can be a feature, a microservice, your infrastructure or even your architecture.
How does load testing work?
A virtual user is made of requests (HTTP or any other web protocol) sent by the load generator. These requests are generated according to a workflow defined in a simulation to reproduce a real user’s behavior.
Since virtual users are made of requests, Gatling and Gatling Enterprise are agnostic solutions: you can test all your applications, whatever the underlying technologies, as long as they are based on web protocols.
The load generator collects the response times of all the requests. If you are using Gatling, the load generator then generates an HTML report, including data and charts about your test. If you are using Gatling Enterprise, your load generators send all the metrics collected to a database. You can then watch your reports in real time in a centralized web interface and compare your test’s results with the history of all your load tests.
How to use Gatling and Gatling Enterprise?
Load testing is about experimenting and investigating. You need first to have a good knowledge of your users’ behaviors, to craft your simulations. You can use Gatling’s recorder to bootstrap your simulation’s code. You then test your whole application or only parts of it, to understand what your bottlenecks are.
You can use various injection profiles (how your virtual users are injected in your system) and different kinds of load tests to investigate your application:
- Capacity test: increase step by step your users’ arrival rate until your system crashes, to find out how many concurrent users your system can handle
- Stress test: simulate a peak of traffic with a high number of virtual users arriving in your system within the same time window, to validate your application’s performances according to your business strategy
- Soak test: run a load test over several hours or days to measure the long-term impacts of traffic on your website (e.g. memory leaks)
At the end of your tests, you can analyze your reports and iterate by changing one or several parameters, to investigate further your performance issues and ultimately solve them.