-
Notifications
You must be signed in to change notification settings - Fork 35
Add server configurations back in #81
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
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
In general I'm right there with you with keeping configuration to a minimum, but here's my general thinking on why we might want the timeouts configurable
@estolfo does that influence/change your thinking at all? |
Those are good points, I agree we should keep the config in for the timeouts. We can discuss/change the name via the separate issue, which you've referenced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about MaxHeaderBytes? Should we remove that explicit configuration and rely on the default value, which is what we are using now anyway?
Hmm, thinking that one through, making MaxHeaderBytes
user-configurable seems like too much configuration complication at this point.
Re: whether we need an explicit value or not — that's a "six of one, half dozen the other" decision for me, but talking though those trade-offs
-
Having an explicit value of 1MB (all hail bitwise arithmetic:
1 << 20
) means our code is slightly more complicated -
Not having an explicit value means we're relying on a default, which might be different in older versions of Go or change in a future version of go
So in my mind having a default means we're more in control of how our program will behave when/if folks compile it themselves, so I'd be in favor of keeping it.
ok @astorm that works for me 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I unintentionally removed the server configurations in a previous PR and I'm opening this PR so we can discuss whether we want these settings to be configurable.
Questions:
ReadTimeout
andWriteTimeout
are set to their zero value (0) if not set otherwise, which means there will be no timeout. Do we want users to be able to set these timeouts?ReadTimeout
andWriteTimeout
? Currently, they are set to the same user-configured value.DefaultMaxHeaderBytes
is what is used forMaxHeaderBytes
if it's not set otherwise. Its value is 1 << 20, so I don't see the point of hardcoding it ourselves to that value.I personally think we should provide as few configuration options as possible to the user and only options in later if we need them.