Hacker News new | ask | show | jobs
by cesarb 3254 days ago
All this discussion about UDP and MTU reminded me of an old StackOverflow answer of mine (https://stackoverflow.com/a/276096):

"Alternative answer: be careful to not reinvent the wheel.

TCP is the product of decades of networking experience. There is a reason for every or almost every thing it does. It has several algorithms most people do not think about often (congestion control, retransmission, buffer management, dealing with reordered packets, and so on).

If you start reimplementing all the TCP algorithms, you risk ending up with an (paraphasing Greenspun's Tenth Rule) "ad hoc, informally-specified, bug-ridden, slow implementation of TCP".

If you have not done so yet, it could be a good idea to look at some recent alternatives to TCP/UDP, like SCTP or DCCP. They were designed for niches where neither TCP nor UDP was a good match, precisely to allow people to use an already "debugged" protocol instead of reinventing the wheel for every new application."

1 comments

You are absolutely right. But we need to remember - our motivation is to get a solution without most of TCP mechanisms to suit cases where it is not required. SCTP - is more of an alternative to TCP and implements mechanisms that are not required by our motivation. DCCP - is more close to what we want as it solves security concern: congestion collapse.

And you are right - we do not want reinvent the wheel.