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
[Feature Request] KEEP_ALIVE_CONNECTIONS #1272
Comments
Hi! Is there anyone working on that? I'd like to try to implement that, but not sure if that's desired by core developers. Also, extra thoughts on realisation appreciated. |
@LittleLampLight It does sound like something that should not be too difficult to add. Take a look at https://github.com/huge-success/sanic/blob/master/sanic/server.py, and you will see that I am also curious to see if this is something that any of the ASGI frameworks have already implemented. We plan to make a push towards becoming ASGI compliant after the 1st of the year. So, as for whether it is or is not a worthwhile use of your time, the answer sort of depends to what degree we adopt and push ASGI. However, it is my personal opinion that even if we jumped fully into that bucket, we will still be supporting and there will still be a need to handle this inside Sanic itself for some time. And if so, as long as there were no performance penalties, I see this as a worthwhile enhancement. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions. |
It will be nice if a keepalive config similar to what nginx upstream has gets added to sanic. Basically, it limits the number of idle connections, and closes the least recently used one when the limit is exceeded. I am not entirely sure, but I think it will be more useful than the current KEEP_ALIVE_TIMEOUT config.
reference: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
The text was updated successfully, but these errors were encountered: