-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add SO_REUSEPORT support to socket #396
Add SO_REUSEPORT support to socket #396
Conversation
655bb94
to
232648b
Compare
src/nc_stats.c
Outdated
@@ -827,7 +828,9 @@ stats_listen(struct stats *st) | |||
log_error("socket failed: %s", strerror(errno)); | |||
return NC_ERROR; | |||
} | |||
|
|||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ton31337 twemproxy can run on mac or freebsd also. so I think you should check other os too not only linux :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charsyam 👍 of course will fix this, but need to be sure if it's worth to spend more time. I mean if it's planned to be merged or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charsyam are you able to test this on FreeBSD ? :)
daccbb6
to
0ac411f
Compare
change looks great - i need to test this before merging. |
+1 |
@manjuraj ping |
0ac411f
to
973886c
Compare
Introduce new feature for Twemproxy running on newer kernels. With this feature you are able to do upgrades, restarts without any downtime. Kernel does load balancing between processes with the same host:port pairs. Also, helps running on more than single core. Signed-off-by: Donatas Abraitis <[email protected]>
973886c
to
3c9cec1
Compare
This seems to work locally - testing since I haven't used SO_REUSEPORT elsewhere. I can start two nutcracker instances for memcached with
|
Add SO_REUSEPORT support to socket. Introduce new feature for Twemproxy running on newer kernels. With this feature you are able to do upgrades, restarts without any downtime. Kernel does load balancing between processes with the same host:port pairs.