tsenart / vegeta

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

Handle targets and output files in cloud storage (GCS and/or S3) #599

Open sbouchardet opened 2 years ago

sbouchardet commented 2 years ago

Hi, guys. :wave: Sorry if this feature exists or if it is already addressed. Would be nice if vegeta could handle targets and output files in cloud storage, like GCS or S3.

My idea is to make a command like

vegeta attack -targets="gs://mybucket/targets-v0.json" -output="gs://mybucket/loadtest-v0.bin"  ...

Btw, if this is out of this project scope, please let me know. IMHO, this would make the usage of vegeta in cloud environments easier.

Proposal

I think this could be implemented using the storage clients. [ref1 ref2]

Btw, if you guys like the idea, I could include this feature.

Background

I've running vegeta to perform load testes that need different targets files for each test. Those target files are generated previously in a script and save in a GCS bucket. Then, I need to include a step to download the target file from GCS (could be s3 too) before running the test, so I can reuse my docker image, without recreating an image for each test. After the attack, I copy the result to the bucket, so we can get it and see the results and share it with others team members.

Workarounds

I usually download those target files before run the load test. In the current implementation, we handle this in a bash script inside a docker image.