wrk icon indicating copy to clipboard operation
wrk copied to clipboard

Wrk close connection so quickly, what is the condition to make wrk close connection?

Open tantm3 opened this issue 1 year ago • 1 comments

Hi everyone!

I am faced with the issue that the work tool opens and closes the connection so fast even though we have the keep-alive option enabled. I checked the established connection with the command netstat, here is the output:

netstat -tn | grep 163 | grep ES
tcp        0    859 49.213.85.162:80        49.213.85.163:6478      ESTABLISHED
tcp        0    859 49.213.85.162:80        49.213.85.163:6520      ESTABLISHED

I saw that source ports: "6478" and "6520" from wrk server are changed continuously. I run test from server with IP 49.213.85.163 and use this command: ./wrk -t1 -c2 -d300s http://49.213.85.162 It seems like the wrk tool is send a fix amount of HTTP requests (in my case about 100request/s)and then it will renew a connection. So, what is the condition that makes the wrk close the connection and can I increase the connection time from wrk so that it's not established a new connection?

Thanks for your time reading my question!

tantm3 avatar Aug 09 '24 10:08 tantm3

e,I think it use same connection, no close the connection that created one. parameter -c stand for the meaning that create the amount of connection when launch. It no change connection continuously.

norilover avatar Dec 25 '24 09:12 norilover