TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

TCP is an underspecified two-node consensus algorithm

135 pointsby r4umabout 7 years ago

6 comments

nh2about 7 years ago
shutdown() and half-closes are not &quot;archaic&quot; features.<p>You need them to get even the basic stuff right (see <a href="https:&#x2F;&#x2F;blog.netherlabs.nl&#x2F;articles&#x2F;2009&#x2F;01&#x2F;18&#x2F;the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable" rel="nofollow">https:&#x2F;&#x2F;blog.netherlabs.nl&#x2F;articles&#x2F;2009&#x2F;01&#x2F;18&#x2F;the-ultimate-...</a>) and you need it even more to implement &quot;modern&quot; application layer protocols like HTTP2 (if you don&#x27;t use it, you get data loss bugs like this: <a href="https:&#x2F;&#x2F;trac.nginx.org&#x2F;nginx&#x2F;ticket&#x2F;1250#comment:4" rel="nofollow">https:&#x2F;&#x2F;trac.nginx.org&#x2F;nginx&#x2F;ticket&#x2F;1250#comment:4</a>).
lkarstenabout 7 years ago
I applaud the effort to hate on &quot;smart&quot; middleware proxies!<p>That being said, author gets no points for namedropping random distributed systems algorithms and using tcp keepalives (2 hours minimum!) as an argument against TLS terminating proxies.<p>Is there a reason to (as he says) &quot;fully implement the protocol&quot; in the proxy? I battled with websockets through Pound last week, and it simply doesn&#x27;t work because the author took a non-postel stand on protocol specifics.<p>Having a protocol agnostic proxy like hitch (previously stud) fixed that without losing functionality, and I expect it to age better as well.
评论 #16616979 未加载
评论 #16617515 未加载
评论 #16616717 未加载
teknopaulabout 7 years ago
I dont grok this, if tcp&#x27;s model has fundamental problems how come the Internet works. :)<p>The fact that a protocol technically is not perfect and causes jip for isps does not mean the application layer has to get involved.<p>I&#x27;ve been writing tcp based apps for years and the stream abstraction has never failed me. After reading this I dont see why I should change that assumption? I have to rebuild connections occasionally but its never cost my application so much that an alternative more complicated abstraction layer made sense. I usually write req&#x2F;response over tcp, an even more inaccurate abstraction. Occasionally nonblocking code. Never have I wanted more complexity than nio in my application layer.<p>Devs do know that &quot;tcp is not a stream of bytes&quot; but deliberately do not want to get app code involved.
评论 #16616911 未加载
评论 #16617143 未加载
评论 #16617053 未加载
kenforthewinabout 7 years ago
I suppose you could call it a two-node consensus algorithm, the same way plugging a flash drive into your laptop is. Even after reading, I don&#x27;t see the benefit of viewing TCP this way.
评论 #16621631 未加载
peterwwillisabout 7 years ago
The problem is in thinking of an HTTPS request-response through proxies as a single TCP connection. It isn&#x27;t.<p>A TLS proxy is not a normal part of a layered TCP&#x2F;IP connection. It&#x27;s literally in the name: &quot;terminating&quot; proxy. It stops the connection right there. Anything after the TLS proxy is outside the scope of the initial connection. Applications have to be engineered to pass on data from one connection to another.<p>An example is stateful firewalls. Almost all stateful firewalls are NAT gateways with rules. NAT gateways are designed to pass certain things from one connection to another, but they are not simply unwrapping a layer from a connection and passing it on: they maintain separate connections. <i>edit</i> Apparently I&#x27;m wrong, as Netfiler apparently only defragments and then changes addresses and ports, but firewall vendors basically keep independent connections (for security reasons)<p>TCP is specified just fine <i>for consensus on a single TCP connection</i>. It isn&#x27;t specified for an HTTPS connection through middleware. Hence, such middleware is complicated.
VMGabout 7 years ago
title is borked