-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[erts, kernel] reuseaddr/reuseport/exclusiveaddruse support/fixes #6522
[erts, kernel] reuseaddr/reuseport/exclusiveaddruse support/fixes #6522
Conversation
CT Test Results 4 files 186 suites 1h 48m 1s ⏱️ For more details on these failures, see this check. Results for commit 2ac142a. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
@rickard-green There is a problem with using |
@okeuday Yes, your right. We probably need to expose the load balancing option as well. |
2219019
to
2ac142a
Compare
Added an
|
@rickard-green You may want to consider |
* Introduce socket option 'reuseport' which may or may not have load balancing. * Introduce socket option 'reuseport_lb' with load balancing. * Introduce socket option 'exclusiveaddruse'. This socket option is Windows specific and will silently be ignored on other systems. * Change behavior on Windows so that SO_REUSEADDR is only set if both 'reusaddr' and 'reuseport' have been set. This since SO_REUSEADDR on Windows behaves as BSD behaves if both SO_REUSEADDR and SO_REUSEPORT have been set.
2ac142a
to
27258e9
Compare
@okeuday We've decided not to error out when reuseport without load balancing is not available in this API. The socket API is expected to get a more fine-grained option API. |
Introduce socket option
reuseport
which may or may not have load balancing.Introduce socket option
reuseport_lb
with load balancing.Introduce socket option
exclusiveaddruse
. This socket option is Windows specific and will silently be ignored on other systems.Change behavior on Windows so that
SO_REUSEADDR
is only set if bothreusaddr
andreuseport
have been set. This sinceSO_REUSEADDR
on Windows behaves as BSD behaves if bothSO_REUSEADDR
andSO_REUSEPORT
have been set.