vegeta icon indicating copy to clipboard operation
vegeta copied to clipboard

How does vegeta adjust connection creation?

Open fred214 opened this issue 3 years ago • 0 comments

I did some stress testing in Kubernets via vegeta

  1. test in cluster with internal K8s service endpoint, there are only two connections and the test can finished
watch -d ss -s
Total: 3
TCP:   110 (estab 2, closed 108, orphaned 1, timewait 2)

Transport Total     IP        IPv6
RAW	  0         0         0
UDP	  0         0         0
TCP       2         2         0
INET	  2         2         0
FRAG	  0         0         0
  1. Using same rate, test with ingress endpoint through nginx controller, there are so many connections vegeta created and the test cannot finished
watch -d ss -s
Total: 13175
TCP:   24640 (estab 10833, closed 11470, orphaned 0, timewait 0)

Transport Total     IP        IPv6
RAW	  0         0         0
UDP	  0         0         0
TCP	  13170     13170     0
INET	  13170     13170     0
FRAG	  0         0         0

I guess testing with ingress endpoint, will through SNAT->LB->Ingress controller->SVC, the latency increased, for guaranteeing the request rate, vegeta need to create more tcp connections to send the request. Is my understanding right? Even if I set the -max-connections at 10, the vegeta also create connections more then it. Is that mean for guaranteeing the request rate, vegeta will create connections as closer as the -max-connections?

fred214 avatar Jul 14 '22 03:07 fred214