-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Proposal
Extend the (excellent) vegeta attack -format=json utility such that the rate of requests comes from the timestamps in the input json file (rather than a constant rate specified on the CLI). As a bonus, provide a --playback-speed-multiplier arg that would allow the user to speed up the rate of requests (similar in principle to a podcast or youtube video).
Background
I am currently using vegeta to test application changes by replaying a sample of production request traffic. The existing vegeta attack -format=json provides a straightforward interface for me to feed in requests that I have exported from our logging service. The missing piece is that vegeta submits the requests at a constant rate, which does not mirror the realistic rate of requests to our services.
Combined with the bonus --playback-speed-multiplier flag, this would allow for business use-cases like:
The latest efficiency improvements have lowered CPU utilization from 80% to 50% when simulating production traffic during our daily peak.
The database is able to support 2x the rate of production traffic without exceeding CPU > 90% (which would come from
--playback-speed-multiplier 2)
Workarounds
Estimating a constant rate based on the average rate of requests in the request log. This is what I'm currently doing.