blog.cloudflare.com · Saved

connect() - why are you so slow?

blog.cloudflare.com/linux-transport-protocol-port-selection-performance

What Jamie wrote

Cloudflare has some great investigations into super edge case performance stuff that only matters at their scale. This was a fun sleuth!

At this point, we can summarize that the odd/even port split is what is causing our performance bottleneck. And during the investigation, it was not obvious to me (or even maybe you) why the offset was initially calculated the way it was, and why the odd/even port split was introduced. After some git-archaeology the decisions become more clear.

The odd/even thing here would never have been suspected without the detailed analysis.