2 ms·
I've used vegeta (https://github.com/tsenart/vegeta https://github.com/tsenart/vegeta) on a couple of projects. Easy to setup and use. IMHO how you load test i
by jillesvangurp 6y ago
I've used vegeta (https://github.com/tsenart/vegeta https://github.com/tsenart/vegeta) on a couple of projects. Easy to setup and use.
IMHO how you load test is almost as important as where you load test and understanding why. There are three separate reasons to do load testing:
1) Performance testing. Confirm the system does not degrade under a specified load and find out what performance can be expected under these circumstances. This is basically ensuring your system can handle X amount of traffic without issues and knowing your baseline performance. You should get the same kind of response times as you are getting from live server telemetry.
2) Stress testing. finding out what happens when the system is stressed beyond its specs. How does it degrade & where.
3) Reliability testing. Find out how your system breaks and when. The goal here is to try to break the system and test things like failover and making sure you don't lose or corrupt data. Better to die gracefully then abrubtly.
If that's new to you, you've been probably doing it wrong because those 3 require very different approaches.
I tend to avoid having to do load testing as it sucks up time without telling me much if interest. I instead opt for having decent telemetry on the live system. It will tell me how it performs and where the bottlenecks are. I can set alerts and take action when things degrade (e.g. because of a bad change). Besides there is no substitute for having real users doing real things with real data. And in any case, having telemetry is crucial to do any meaningful stress or reliability testing. Otherwise you just know it degrades without understanding why.
There are still valid reasons to do separate load testing of course but I seem to get away with mostly not doing this. When I do, vegeta is what I reach for first. I find most of the need for load testing is requirements related to SLAs or otherwise nervous product owners that need to be reassured. They tend to be more interested in performance tests (i.e. the happy case) whereas technically stress testing is where you learn stuff about your system.
- csours 6y agoThanks for breaking out the 3 sub-types. I would add if someone is not careful they may not be testing what they think they are testing. For example, when testing response latency, beware of caching. If you hit the same data a million times, your average can look really good, but that's not what your users will experience.