Comments (6)
Hi, on your steps you have --kepalive on
, it should be -keepalive=false
.
However, and to not open a new issue, I do actually see an issue regarding connections falling back to keepalive, when I specify --rate of 1000 or more, with rate under 500 seems ok but with 1k seems it's reusing connections regardless specifying keepalive false.
I did some research and I see Vegeta's code has references to this library https://cs.opensource.google/go/x/net that was in use originally, but since then I think you are using the built in 'net' library (https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L10). However, these two libraries differ on the Dialer function regarding keepalive:
original (https://cs.opensource.google/go/x/net/+/master:internal/quic/config.go;l=92):
// an idle connection alive.
// If zero, keep alive packets are not sent.
// If greater than zero, the keep alive period is the smaller of KeepAlivePeriod and
// half the connection idle timeout.
new (https://pkg.go.dev/[email protected]#Dialer):
// probes for an active network connection.
// If zero, keep-alive probes are sent with a default value
// (currently 15 seconds), if supported by the protocol and operating
// system. Network protocols or operating systems that do
// not support keep-alives ignore this field.
// If negative, keep-alive probes are disabled.
so if you are actually using the built in library you should be passing a negative integer here and not a 0 so this works correctly: https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L188
note: I don't usually work with go, this is an educated guess reading through a bit here trying to explain the behavior I'm seeing, hopefully it helps :)
from vegeta.
Hi all,
quick update, I did some more testing (using netstat -panto
to verify the connections) with the current code it does indeed use for any rate keepalive and retransmissions, I did a custom build changing the line referenced to -1 and now I'm actually seeing connections with keepalive off (though strangely I still see a bunch of retransmissions and one or two sporadic keepalives - but at least now I can see most of the traffic not using keepalive).
Cheers
from vegeta.
thanks for the reply @Choms
there may be typo in my repoduction steps but i ran same command with keepalive off
but still see the keepalives
# vegeta --version
Version: v12.11.1
Commit: 6fbe391628eeeae1adf39522a55078797e6e7f2e
Runtime: go1.20.8 linux/amd64
Date: 2023-10-02T09:05:05Z+0000
echo "GET https://www.google.com/" | vegeta attack --duration=10m --rate=3 --keepalive off | vegeta report -every 3s
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 0 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (24.63/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 0 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (23.15/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 48 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 on (0.20/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 0 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (21.24/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 0 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (14.45/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 0 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (11.93/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 0 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (10.53/0/0)
root@48ec74f242ab:/# netstat -panto |grep :443 |grep ESTA
tcp 0 41 172.17.0.2:59877 142.250.182.132:443 ESTABLISHED 2926/qemu-x86_64 keepalive (9.82/0/0)
from vegeta.
yeah, for that to work you need to change this line to be -1 instead of 0 https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L188
then recompile Vegeta :)
from vegeta.
yeah, for that to work you need to change this line to be -1 instead of 0 https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L188
then recompile Vegeta :)
i see, then its a bug, i will wait for the fix, for now i am good with keepalive :-)
from vegeta.
yea it's a bug, not sure if this project is still active though
from vegeta.
Related Issues (20)
- Vegeta not working with ipv6 hosts HOT 3
- Panic in performance test HOT 2
- Add easyjson to ReadMe HOT 1
- Vegeta does not honour the connections flag when rate is 0 HOT 4
- add binaries download for windows 10/11 HOT 1
- Prometheus + Grafana Integration not working HOT 3
- Immediately stop vegeta while using go client HOT 4
- Add support for HAProxy ProxyProtocol
- I am getting a lot of HTTP zero in the results, how can I troubleshoot it?
- Latency is not being reported correctly on windows.
- How to change x-axis for the vegeta realtime?
- Why canβt I test this local custom domain name mapping service?
- ipv6 is being used on a client machine when not supported HOT 1
- Can the latest version be published on Go packages? HOT 1
- Officially call json input format JSON Lines? HOT 1
- Limiting total number of requests HOT 4
- vegeta unable to write to files with -output
- TCP sockets opened lower than requested number of connections HOT 4
- Running "easyjson": exec: "easyjson": executable file not found in $PATH on ubnutu 22.04
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vegeta.