Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -keepalive flag to toggle persistent conns #91

Merged
merged 4 commits into from
Nov 7, 2014

Conversation

jpfuentes2
Copy link
Contributor

The flag is enabled by default.

closes #89

@@ -38,6 +38,7 @@ func attackCmd() command {
fs.IntVar(&opts.redirects, "redirects", vegeta.DefaultRedirects, "Number of redirects to follow")
fs.Var(&opts.headers, "header", "Request header")
fs.Var(&opts.laddr, "laddr", "Local IP address")
fs.BoolVar(&opts.keepalive, "keepalive", true, "Use Keep-Alive for persistent conns")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conns -> connections

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@tsenart
Copy link
Owner

tsenart commented Nov 7, 2014

👍

tsenart added a commit that referenced this pull request Nov 7, 2014
Add -keepalive flag to toggle persistent conns
@tsenart tsenart merged commit 249c223 into tsenart:master Nov 7, 2014
@tsenart
Copy link
Owner

tsenart commented Nov 7, 2014

@jpfuentes2 jpfuentes2 deleted the jf_keepalive_option branch November 7, 2014 15:30
@yhafri
Copy link

yhafri commented Jan 4, 2020

@tsenart can you please explain how to disable keepalive?
Should i pass this option to vegeta like this:

echo | ... vegeta attack -keepalive=false ...

I want vegeta to send 1 request to my server and close the connection immediately.
No more than 1 request per connection at a time.

Thank you.

@tsenart
Copy link
Owner

tsenart commented Jan 12, 2020

Yes that's correct, you should pass -keepalive=false to disable keep alive, so every new request will establish a new TCP connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add disable-keepalive flag
4 participants