libev: notify only one process when multiple processes are listening socket

Alex Leone acleone at gmail.com
Tue Jul 16 04:57:25 CEST 2013


Try setting SO_REUSEADDR or SO_REUSEPORT.

On 3.9+ kernels SO_REUSEPORT will load balance nicely:
https://lwn.net/Articles/542629/
On Jul 15, 2013 5:19 PM, "trafdev" <trafdev at mail.ru> wrote:

> Hello.
>
> There are N processes listening same socket and subscribed to libev
> notifications.
>
> N-1 of them getting "resource temporaly unavailable (eagain) while
> accepting incoming connection, one wins and handles connection.
>
> Is it possible to get notification on the socket descriptor only in one
> process and not waste resources of others?
>
> ______________________________**_________________
> libev mailing list
> libev at lists.schmorp.de
> http://lists.schmorp.de/cgi-**bin/mailman/listinfo/libev<http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20130715/1097ae25/attachment.html>


More information about the libev mailing list