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

nsqd: add flag --min-output-buffer-timeout with default 25ms #1133

Merged
merged 2 commits into from
Feb 10, 2019

Conversation

ploxiln
Copy link
Member

@ploxiln ploxiln commented Feb 2, 2019

Lower timeouts are more expensive for nsqd, so it seems odd to put
a maximum on the timeout a client can request, but not a minimum.

Also change --max-output-buffer-timeout default to 30 seconds,
up from 1 second. Again, it's cheaper/easier for nsqd.
But we may still want to help people avoid unwittingly setting
it close to (or above) the default --msg-timeout (60 seconds).


I wasn't familiar with output_buffer_timeout until #1125 came up. I don't have a real need for these options changes, they just seem to make a bit more sense. But what do you think @mreiferson ?

possibly useful links to refresh memory:
043b79a
https://nsq.io/clients/tcp_protocol_spec.html#identify

Lower timeouts are more expensive for nsqd, so it seems odd to put
a maximum on the timeout a client can request, but not a minimum.

Also change --max-output-buffer-timeout default to 30 seconds,
up from 1 second. Again, it's cheaper/easier for nsqd.
But we may still want to help people avoid unwittingly setting
it close to (or above) the default --message-timeout (60 seconds).
@ploxiln

This comment has been minimized.

@ploxiln

This comment has been minimized.

@ploxiln
Copy link
Member Author

ploxiln commented Feb 2, 2019

(The reason I was a bit confused about disabling the timeout is because I thought I read somewhere that -1 would disable output buffering, but that's just for output_buffer_size. So it's odd that there's a --max-output-buffer-timeout but if the client requests -1 for output_buffer_timeout it gets a sort of infinitely long timeout.)

@ploxiln
Copy link
Member Author

ploxiln commented Feb 2, 2019

This makes me think that if either output_buffer_size or output_buffer_timeout is disabled, the other should be too. I don't think that currently is the case.

Copy link
Member

@mreiferson mreiferson left a comment

Choose a reason for hiding this comment

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

Seems reasonable, LGTM.

@ploxiln
Copy link
Member Author

ploxiln commented Feb 4, 2019

I'm going to let it sit for just a bit, then re-review and manually test a bit, before merge.
(I opened this partly for discussion, and was expecting some direction :)

@mreiferson
Copy link
Member

Ha, it seemed like the conversation (with yourself) sort of concluded 😜? The changes don't seem controversial, what do you feel like we need to discuss?

@ploxiln
Copy link
Member Author

ploxiln commented Feb 4, 2019

Maybe nothing :) Just maybe, for backwards compatibility, or some other practical reason, we should be careful changing some bit here.

Anyway I'll just do a sanity check (min/max is enforced) sometime in the next few days.

@ploxiln
Copy link
Member Author

ploxiln commented Feb 10, 2019

Did some local testing, looked good.

Side note: pynsq does not currently allow -1 for output_buffer_size or output_buffer_timeout

@ploxiln ploxiln merged commit c3c364e into nsqio:master Feb 10, 2019
@ploxiln ploxiln deleted the min_output_buffer_timeout branch August 27, 2019 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants