4 ms·
Sockets in a Bind: Troubleshooting Port Exhaustion in Heroku's Routing Layer
- zimbatm 10y agoThe linked article does a much better job of explaining the problem. Just read this one: https://idea.popcount.org/2014-04-03-bind-before-connect/ https://idea.popcount.org/2014-04-03-bind-before-connect/
- skinowski 10y agoA better solution would be relatively new socket option: IP_BIND_ADDRESS_NO_PORT https://www.mail-archive.com/netdev@vger.kernel.org/msg66879.html https://www.mail-archive.com/netdev@vger.kernel.org/msg66879...
- Buge 10y agoThat C code has a buffer overflow. Also they call atoi unnecessarily in each loop iteration.
- vor1968 10y agoThis type of thing would not have been an issue 15 years ago. This is Richard Stevens socket programming 101.