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

trafdev trafdev at mail.ru
Tue Jul 16 05:29:25 CEST 2013


Unfortunately doesn't work in FreeBSD -
SO_REUSEPORT produces effect when only one (first binded) process gets 
notifications and other didn't until this
first process dies, then second starts receiving notifications and so 
on (only one process receiving notifications at given time).
I hope libev has some mechanism to disable broadcasting.

On Mon Jul 15 19:57:25 2013, Alex Leone wrote:
> 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
> <mailto: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 <mailto:libev at lists.schmorp.de>
>     http://lists.schmorp.de/cgi-__bin/mailman/listinfo/libev
>     <http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev>
>



More information about the libev mailing list