-
Notifications
You must be signed in to change notification settings - Fork 51
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
Need to be able to set timeouts / limits to handle misbehaving clients #70
Comments
See also #10 |
These would need to go in hyper. I would check to see if it is already possible.
Implemented as a middleware. It can start in this repo and eventually be moved into tower-http.
Can be discussed in #71
You will have to elaborate more on this one. If you want to take a stab at any of these items, I can help with some pointers. |
For example, when you set a request body timeout of 30 seconds, and after the timeout it turns out that 30 MB of body payload already has been received - in that case, yes, 30 seconds have passed, but progress is made, so you want to ignore this timeout and set a new one. Either this, or 2 seperate types of timeout: absolute, with a hard limit (N minutes no matter what) and relative, one that fires if no progress is made (connection stalled) for a certain period of time. If it is possible to implement this as middleware, even better, because that would allow more complicated strategies as well (say when max. number of clients is reached, close the oldest sessions that are idling in keepalive). For completeness, a list of nginx's timeouts.
|
If tower-web is exposed to the internet, it needs to be robust when handling misbehaving clients. I'm thinking of
The last two could probably be implemented as middleware if there was a way to get the client's IP address.
It could be that this should be implemented in hyper instead of in tower, if so tell me and I will open an issue with hyper.
The text was updated successfully, but these errors were encountered: