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

Behavior of -resolvers flag #568

Closed Patanouk closed 3 years ago

Patanouk commented 3 years ago

Question

Hello

I'm trying to run a benchmark with a -resolvers flag within a kubernetes cluster Kubernetes internal DNS is resolving example-host to 172.25.13.96

Here is my curl call

curl -X GET example-host:8080/liveness -w %{http_code} <- Returns 200
curl -X GET example-host:8080/liveness --connect-to example-host:8080:172.25.13.96 -w %{http_code}   <- Returns 200 if I force the IP resolution

Here are my vegeta benchmarks, run from within the cluster

This benchmark is returning 200 status code, as the host is resolved with the internal DNS

echo "GET http://example-host:8080/liveness" | vegeta attack | tee results.bin | vegeta report

This benchmark is failing, returning 0 status code

echo "GET http://example-host:8080/liveness" | vegeta attack -resolvers=172.25.13.96 | tee results.bin | vegeta report

Am I using the flag incorrectly? Is there a way to get more output from vegeta, to see why the calls are failing?

Also, I know that the flag is useless in that case, but I have another benchmark where I will need it Here is just a minimal example reproducing the behavior

Patanouk commented 3 years ago

Missed the port in the flag...

-resolvers=172.25.13.96:443 works fine