tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.51k stars 1.36k forks source link

Why vegeta doesn't support VUs like in k6 and locust? #546

Closed limbuu closed 1 year ago

limbuu commented 4 years ago

There is support for VUs or virtual users in locust and K6 but not in Vegeta. What is the alternative for VUs in vegeta? Can someone please elaborate me this.

tsenart commented 1 year ago

A Virtual User is an arbitrary and usually under-defined unit of load. What does VU even mean when two different users can use your API completely differently and with different request rate?

Request rate is objective and measurable without having to define what a user is. If you go through the very specific effort of defining what a user is for you, in your context, it's trivial to produce a vegeta attack to match that user profile.

A different (but related) question is why Vegeta doesn't support the concept of sessions. It is because it was built to test individual API endpoints, not user flows through different pages in a website. It's a long standing feature request to add support for something like that (which I believe K6 and Locust already do).

It would be a very large departure from what Vegeta is. A user session implies human like timing between clicks in links and other website actions. That seems fundamentally incompatible with the notion of hammering a set of endpoints at a specific request rate.

I might consider something like this in an upcoming re-design of Vegeta, or maybe its successor.