How do I do a load test for POST/PUT apis
-
Please give an example on how to use multiple POST apis for a test. Ex: api A has to be hit at 40k rpm api B has to be hit at 32k rpm api C at 20k rpm and so on.
-
What configuration machine will I need to achieve the above test?
Also how do i pass CSV files as input
Please give an example on how to use multiple POST apis for a test.
oha doesn't support multiple targets.
drill maybe better to such a usecase.
But you can run multiple oha parallely in shell.
# `oha` only supports RPS(request per second) so I divided 40k by 60
oha --no-tui -z 10s -q 66000 {API A} &
oha --no-tui -z 10s -q 50000 {API B} &
oha --no-tui -z 10s -q 3300 {API C}
What configuration machine will I need to achieve the above test?
I don't know. Maybe you want to increase the limit of number of open files for a proccess to bigger concurrency (-c option).
Also how do i pass CSV files as input
It depends your API's spec. If you just put a CSV file to body, you can run by
oha -D {path to CSV} {URL}
Thank you for your answer, I was looking to take data for POST calls from a CSV.