<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 9, 2015 at 1:11 PM Sergej Jurečko <<a href="mailto:sergej.jurecko@gmail.com">sergej.jurecko@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 9, 2015 at 12:59 PM, Benoit Chesneau <span dir="ltr"><<a href="mailto:bchesneau@gmail.com" target="_blank">bchesneau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><span></span><div>You can if you tell to the udp socket to reuse the port:</div><div><a href="https://github.com/refuge/rbeacon/blob/master/src/rbeacon.erl#L414-L425" target="_blank">https://github.com/refuge/rbeacon/blob/master/src/rbeacon.erl#L414-L425</a><br></div><div><br></div><div>If you do this any process will be able to reuse it and send/recv to it.</div><br></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>This enables you to call gen_udp:open for port X from multiple processes. Unfortunately as long as first socket is alive, all traffic will go there. So it's just a reliability improvement (if first process goes down), but not a scalability improvement.<br><br></div></div></div></div></blockquote><div><br></div><div>Well it would allows you to open different socket for the same ports for recv. Normally the threads should compete to get the data according to </div><div><br></div><div><a href="https://lwn.net/Articles/542629/">https://lwn.net/Articles/542629/</a></div><div><br></div><div>So until a process is on another thread or CPU it should increase the concurrency. <br></div><div><br></div><div>- benoît</div></div></div>