News for hackers. Stuff that matters.
Re:TCP is an underspecified two-node consensus algorithm by teknopaul on Monday March 19, 2018 @04:21AM (#16616832)
I dont grok this, if tcp's model has fundamental problems how come the Internet works. :)

The fact that a protocol technically is not perfect and causes jip for isps does not mean the application layer has to get involved.

I'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/response over tcp, an even more inaccurate abstraction. Occasionally nonblocking code. Never have I wanted more complexity than nio in my application layer.

Devs do know that "tcp is not a stream of bytes" but deliberately do not want to get app code involved.

Re:TCP is an underspecified two-node consensus algorithm by nvarsj on Monday March 19, 2018 @04:44AM (#16616911)
> I dont grok this, if tcp's model has fundamental problems how come the Internet works. :)

Depends on your definition of "works"! Just ask any gamer what happens when someone starts using netflix while they're playing a game... For a lot of people the internet doesn't work very well.

TFA is describing, I think, the issue of stale / dead connections - which can be notoriously difficult to detect. Imagine you are building black boxes that sit in peoples' homes, with a long running TCP connection to push notifications to. With the state of the internet, it's very likely some percentage of those connections will die without either side realizing it. That's where the complexity comes in.

Re:TCP is an underspecified two-node consensus algorithm by bringtheaction on Monday March 19, 2018 @04:50AM (#16616944)
Off-topic on my part here but I think it is so weird that people say “TFA” when referring to the article in the way you are doing. I see this a lot on HN.

IMO it would be natural to use “TFA” in the same way you would use “RTFM” — when you are scolding someone for not having read what they should — but using “TFA” as just a synonym for “the article”... that always throws me off.

Re:TCP is an underspecified two-node consensus algorithm by steveklabnik on Monday March 19, 2018 @07:08AM (#16617525)
You’re both right and wrong. That is, the... anger? you’re picking up isn’t incorrect, but instead lost in translation.

Back in the /. days, which, as far as I know, is where this comes from, people would use it in this way. “Read TFA.” “Have you read TFA?” “Seems like you haven’t read TFA.” Eventually, that morphed into the usage you see on HN and everything else, as kind of a different version of OP.

One useage grows, another dies off.

Re:TCP is an underspecified two-node consensus algorithm by xargon7 on Monday March 19, 2018 @11:30AM (#16619138)
In a nice tone, it's "The Featured Article."
Re:TCP is an underspecified two-node consensus algorithm by bringtheaction on Monday March 19, 2018 @03:12PM (#16622042)
Ah, clever, I like that :) Thanks!
Re:TCP is an underspecified two-node consensus algorithm by bb88 on Monday March 19, 2018 @05:28AM (#16617104)
> Just ask any gamer what happens when someone starts using netflix while they're playing a game.

Every cable modem I have had suffered from some form of bufferbloat. In short it's not TCP's fault that your head shot packet sat in a cable modem's buffer for 5 seconds before being sent to the server.

Edited to add:

> TFA is describing, I think, the issue of stale / dead connections - which can be notoriously difficult to detect.

Normally all long lived connections have some kind of TCP keep alive to them. When the TCP keep alive fails, the connection dies, and it's up to the application to restart the TCP connection. The proxy can send these out as well.

Re:TCP is an underspecified two-node consensus algorithm by jonathanstrange on Monday March 19, 2018 @05:18AM (#16617066)
I remember that back in the 90s it was very hard for me on MacOS to debug network applications when the connection was interrupted or lost due to a crash or a test. It took minutes until the same port could be used again, even when another local port was chosen. To detect a lost connection people used ping-pong signals in their application protocol.

Since then network stacks seem to have improved tremendously but I thought it's still customary to ping the other side from time to time. Is that not enough to solve the problem?

Re:TCP is an underspecified two-node consensus algorithm by ianai on Monday March 19, 2018 @08:18AM (#16617792)
As a lover of the ICMP ping, hosts which do not respond to ping are increasingly prevalent. I’m sure it’s enough to wreck that usage.
Re:TCP is an underspecified two-node consensus algorithm by jonathanstrange on Monday March 19, 2018 @10:16AM (#16618459)
Sorry I wasn't specific enough, I didn't mean ICMP ping but some application protocol specific periodic request-acknowledgment exchange within a TCP connection in order to check that the connection is still alive regardless of what the OS socket layer says. Many application protocols have this, at least older ones, and I always thought the reason for it is that OS TCP stacks are sometimes unreliable or have unreasonable timeouts.

It's been a long time I've done network programming, though...

Re:TCP is an underspecified two-node consensus algorithm by zaarn on Monday March 19, 2018 @09:41AM (#16618253)
On IPv4, blocking ICMP has sadly become the norm since some people abused it for ICMP storms.

On IPv6 it is strongly recommended not to block ICMPv6 since it routes highly important information back to the sender or forwards to the receiver (like when MTU is reached)

Re:TCP is an underspecified two-node consensus algorithm by zrm on Monday March 19, 2018 @10:18AM (#16618466)
> On IPv6 it is strongly recommended not to block ICMPv6 since it routes highly important information back to the sender or forwards to the receiver (like when MTU is reached)

The same is true for IPv4. Path MTU discovery is not new for IPv6. Most systems set the DF (don't fragment) bit by default.

Re:TCP is an underspecified two-node consensus algorithm by zaarn on Monday March 19, 2018 @11:05AM (#16618886)
On IPv4 it's a bit of a problem because of the number of legacy middleboxes that block things they don't know, some olders routers have problems with DF (always fun to debug).

IPv6 makes ICMP path MTU discovery part of the protocol and disabling ICMP can (and will) wreak havoc on reliable connections (though TCP can compensate)

Re:TCP is an underspecified two-node consensus algorithm by zrm on Monday March 19, 2018 @03:53PM (#16622450)
> On IPv4 it's a bit of a problem because of the number of legacy middleboxes that block things they don't know, some olders routers have problems with DF (always fun to debug).

The DF bit has been part of IPv4 since day one. There is no excuse for anything in production to not support it. That doesn't mean broken routers don't exist, but "obviously broken router is obviously broken" is properly resolved by removing it from service and possibly finding a suitable museum to put it in.

That isn't the issue. IPv6 doesn't have a DF bit (it's always implied), but sending an IPv4 packet with DF set has the same effect, and most modern systems do that. Most routers will then correctly send back the "Packet Too Big" ICMP message as appropriate. But if the firewall drops that ICMP message, it's just as problematic as doing it for IPv6. The result is the same.

Re:TCP is an underspecified two-node consensus algorithm by teknopaul on Monday March 19, 2018 @07:56AM (#16617717)
OK now it makes sense. If you presume everything must go over https and sometimes you have little to no activity and want to back push events on a stream started by a client, tcp seems horrible! :) Its hard trying to push in the wrong direction, not having udp when its needed. And not having stable unNATed IPs because addresses have run out. Not sure that is TCPs fault tho. Arguably that is www + ip problem. More and more HTTPS is the only Internet allowed. This is bad IMHO and leads to stupid hacks like websockets. Gamers used to open port in their routers in my day and would receive a performance penalty if rhey did not.
Re:TCP is an underspecified two-node consensus algorithm by anon9823675 on Monday March 19, 2018 @08:41AM (#16617885)
> Just ask any gamer what happens when someone starts using netflix while they're playing a game...

Enable fq_codel on the bottleneck device.

Re:TCP is an underspecified two-node consensus algorithm by est on Monday March 19, 2018 @05:39AM (#16617143)
The internet largely doesn't work anymore. Only port 80/443 traffic works.

You can't even send to random SMTP port 25 these days. You will get blocked pretty fast.

Re:TCP is an underspecified two-node consensus algorithm by dorfsmay on Monday March 19, 2018 @08:15AM (#16617783)
Only mail servers should be talking on port 25. Clients should be using 587 to talk to servers.

I've never had an issue with any ISP nor VPS provider with port 25. You can't expect hotels and inflight internet providers to allow you to run a mail server inside their perimeter, they do block 25, but I have never had a problem with 587.

Re:TCP is an underspecified two-node consensus algorithm by zaarn on Monday March 19, 2018 @09:43AM (#16618262)
Problems with 587 usually come from Snakeoil^w AntiVirus software that wants to intercept your email traffic to scan for potential malware.

Obviously it doesn't have the certificate so some bruteforce it by only allowing plaintext. On 587.

Re:TCP is an underspecified two-node consensus algorithm by 0xffff2 on Monday March 19, 2018 @04:14PM (#16622646)
Every home ISP I've had in the last 10 years also blocks 25. Why shouldn't I be allowed to run a mail server from my home?
Re:TCP is an underspecified two-node consensus algorithm by dorfsmay on Tuesday March 20, 2018 @12:54AM (#16626149)
This hasn't been my experience. I'm assuming you've check the FW rules in their modem/router?
Re:TCP is an underspecified two-node consensus algorithm by 0xffff2 on Tuesday March 20, 2018 @10:58AM (#16629105)
More to the point, I've talked to second line tech support agents who have told me that they block all incoming connections on port 25 as a spam prevention measure.
Re:TCP is an underspecified two-node consensus algorithm by anon9823675 on Monday March 19, 2018 @08:43AM (#16617896)
My irc bnc, dns, ssh and bittorrent servers are humming along just fine.
Re:TCP is an underspecified two-node consensus algorithm by megous on Monday March 19, 2018 @08:48AM (#16617925)
Where that happens?
Re:TCP is an underspecified two-node consensus algorithm by bb88 on Monday March 19, 2018 @05:15AM (#16617053)
> I dont grok this, if tcp's model has fundamental problems how come the Internet works. :)

So he's arguing about using a proxy to "shield" the server from knowing about all the ins and outs of the myriad of TCP clients out there.

And then he laments that an HTTP proxy might very well be the root of all evil on the internet because the true client to server end-to-end connection is lost when a proxy is put in the middle, which is pretty standard practice these days.

So one thing that he's incorrect on is that a proxy can know the state of connections, because that's in the TCP packet, but not in the data section [1]. The SYN/SYNACK/ACK hand shake and data retry happens outside of the data section of the TCP packet.

[1] https://en.wikipedia.org/wiki/Transmission_Control_Protocol