<story><title>TCP Puzzlers</title><url>https://www.joyent.com/blog/tcp-puzzlers</url></story><parent_chain></parent_chain><comment><author>ChuckMcM</author><text>That is an &lt;i&gt;awesome&lt;/i&gt; post. If you are thinking about writing distributed systems code you need to understand this behavior of TCP&amp;#x2F;IP completely. Back when a 100 nodes was a &amp;quot;big&amp;quot; network these sorts of problems were so rare that you could be forgiven for not taking them into account, but these days with virtualization you can have a 500 node network all on the same freakin&amp;#x27; host! And the law of large numbers says &amp;quot;rare things happen often, when you have &lt;i&gt;a lot&lt;/i&gt; of things.&amp;quot;&lt;p&gt;Fun anecdote, at Blekko we had people who tried to scrape the search engine by fetching all 300 pages of results. They would do that with some script or code and it would be clear they weren&amp;#x27;t human because they would ask for each page right after the other. We sent them to a process that Greg wrote on a machine that did most of the TCP handshake and then went away. As a result the scrapers script would hang forever. We saw output that suggested some of these things sat their for &lt;i&gt;months&lt;/i&gt; waiting for results that would never come.</text></comment>
<story><title>TCP Puzzlers</title><url>https://www.joyent.com/blog/tcp-puzzlers</url></story><parent_chain></parent_chain><comment><author>richm44</author><text>There are some other fun edge cases - for example:&lt;p&gt;- If you have a port-forward to a machine that is switched off then you can get ICMP network unreachable or ICMP host unreachable as the response to the a SYN in the initial handshake.&lt;p&gt;This can also happen at any point in the connection. Other ICMP messages can also occur like this (eg. admin prohibited).&lt;p&gt;It&amp;#x27;s always worth remembering that the TCP connection is sitting on an underlying network stack that can also signal errors outside of the TCP protocol itself.</text></comment>