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

🤔 Server settings like IdleTimeout, ReadTimeout, WriteTimeout #238

Closed
talgat-ruby opened this issue Mar 23, 2020 · 6 comments
Closed

Comments

@talgat-ruby
Copy link

talgat-ruby commented Mar 23, 2020

Question description
Since was removed from settings the IdleTimeout, ReadTimeout, WriteTimeout params. How to set them now?

v1.8.2 changelog

@welcome
Copy link

welcome bot commented Mar 23, 2020

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!

@Fenny
Copy link
Member

Fenny commented Mar 23, 2020

@talgat-ruby, thanks for submitting your first issue!

We removed most of the settings to keep it more in-lined with expressjs and keep it simple (https://fiber.wiki/application#settings).
If you have a good use case or problem for IdleTimeout, ReadTimeout or WriteTimeout we would love to know and we could re-consider to add these parameters in v1.8.41

For those who do not know what it does, here the explanation taken from fasthttp source.

// ReadTimeout is the amount of time allowed to read
// the full request including body. The connection's read
// deadline is reset when the connection opens, or for
// keep-alive connections after the first byte has been read.
//
// By default request read timeout is unlimited.
ReadTimeout time.Duration

// WriteTimeout is the maximum duration before timing out
// writes of the response. It is reset after the request handler
// has returned.
//
// By default response write timeout is unlimited.
WriteTimeout time.Duration

// IdleTimeout is the maximum amount of time to wait for the
// next request when keep-alive is enabled. If IdleTimeout
// is zero, the value of ReadTimeout is used.
IdleTimeout time.Duration

@talgat-ruby
Copy link
Author

@Fenny thanks.

I am newb in go and was learning through book Let's Go. Where author sets up server and adds IdleTimeout, ReadTimeout, WriteTimeout. It just seems good idea to have flexibility, because both go's native http server and fasthttp have those options.

@Fenny
Copy link
Member

Fenny commented Mar 23, 2020

Good point, I will add these settings in v1.8.41 today 👍 thanks for your contribution.

This was referenced Mar 23, 2020
@Fenny
Copy link
Member

Fenny commented Mar 23, 2020

Closing this issue since v1.8.41 got merged 🍾

@Fenny Fenny closed this as completed Mar 23, 2020
@talgat-ruby
Copy link
Author

@Fenny thanks. The fiber is awesome.

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

No branches or pull requests

2 participants