-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
support reuse_port option when creating server #2679
Comments
Could be done by adding |
From my knowledge and tests reuse port is fundamentally broken for epoll https://idea.popcount.org/2017-03-20-epoll-is-fundamentally-broken-22/ There is a flag that is available since kernel 4.5 that allows you to achieve the same behaviour. Also glibc has to be at least 2.24. Most of the distributions do not have it. Also take into account that this is only appliable for new connections which have the worst code path in terms of performance. Most scenarios relay on long live conections to achieve maximum performance. |
@pfreixes Execuse me, I didn't find any relationship between reuse_port option to the link. |
Because of that @hubo1016
|
@pfreixes As far as I know, |
@hubo1016 please prepare a Pull Request |
@asvetlov |
Fixed by #2693 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Python supports
reuse_port
socket option when creating serverhttps://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.create_server
With reuse_port you can start multiple processes binding with the same port, easily creating a load-balanced server. While it is possible to start each process on different port, it can be done much easier with
reuse_port
option.The text was updated successfully, but these errors were encountered: