The Linux 3.9 release finally introduced a — at least for a networking geek like me — long awaited extension to the socket model: the SO_REUSEPORT socket option. Not to be confused with the virtually default SO_REUSEADDR POSIX socket option, SO_REUSEPORT has its root in BSD 4.4 and offers the ability for multiple, independent processes to listen on the same port at the same time.

This basically means, that from Linux 3.9 onwards, we no longer need to build our own fork(2) hell-based master/slave watch dog contraptions to have multiple processes handle incoming connections efficiently. Instead, we can now leave this to the kernel and just spin up the listening processes we need. As pointed out on the Free Programmer’s Blog, this is especially exciting for programming languages that are, mostly due to implementation specific issues, inherently shitty or incapable of any kind of parallel execution — like Node.js, Python and Ruby.

However, it should probably be kept in mind, that while this is at least in the long run a Godsend in terms of reduced complexity for simple applications that just need some kind of parallel execution, it’s still likely that the solution is not necessarily the performance wise most optimal as we approach extremes. This could probably do with a round of benchmarks, but for now I’m just glad that my days of being dragged kicking and screaming through people’s optimistic implementations based on complete disregard for documentation about the exact consequences of the forking process model might slowly be coming to an end.