Technical dept, part II: SO_REUSEPORT - more than meets the eye?
This actually might become a recurring thing for me, since I have the time and inclination, I've decided to give this idea the tentative term technical dept, so without further ado, here's part II:
Prompted by a a conversation on Twitter I happened upon, I went digging for the original purpose the SO_REUSEPORT, as despite the fact that it's being used very effectively by NGINX, it's not something that seems to have been a worry not that long ago. Turning to my, at this point, trusty old friend source revisioning, to my surprise I found that the feature is much, much older than I expected. It dates back at least to July, 1992 when Andrew Cherenson at SGI used it to fix a bug for multicast, not long after TCP/IP was added and reworked in BSD4.1 and BSD4.2 respectively.
Which also brings up another rather salient point - it's very important to document why a change was made. Andrew seems to have intended this feature solely for a bugfix, but now look at all the interesting ways it's being used.
It is also a bit curious to me that it's a feature that was only added to Linux in 2013 - making it more than 20 years in the making.
jmg@ helpfully pointed me towards an in-depth technical coverage of what it, and the related SO_REUSEADDR, does - and I think it merits reading.