Live data from Hacker News

Falsehoods programmers believe about TCP

lwn.net

81–90 of 247 posts

Re: Falsehoods programmers believe about TCP

#81
post #30

Earlier quoted context omitted.

.. on Linux. If you do that on Windows the MAC will detect the loss of link pulses, report the interface as down, and Windows will "helpfully" reset all your TCP connections.

That seems like way more sensible behaviour.

How so?

Re: Falsehoods programmers believe about TCP

#82
post #10

Earlier quoted context omitted.

5 and 6 are mutually exclusive. They don't make sense logically. And most of the list was never explained at all.

They are not mutually exclusive statements, because they don't exist in isolation: they are both potentially true and false depending on the context of discussion.

But they assert whether or not something exists, as an absolute statement. Maybe TCP packets don't exist in a particular situation, but there is still such a thing as a TCP packet in that case.

Re: Falsehoods programmers believe about TCP

#83

Earlier quoted context omitted.

Pedantically: TCP has segments, IP has packets, and Ethernet has frames. They are one-to-one in simple cases, but not always. https://networkengineering.stackexchange.com/questions/50083... In particular, fragmentation by intermediate routers means that the server and receiver may disagree about the frame and packet boundaries. TCP is expected to make a "reliable" pipe-like service out of whatever happens, and the ap…

Falsehoods programmers believe: TCP/IP can be coherently mapped to the OSI model.

Falsehoods programmers believe: the OSI model

Re: Falsehoods programmers believe about TCP

#84
post #64
post #22

Related: you can get at most once delivery or at least once delivery; you cannot get exactly once delivery. If I had a dollar for every junior who thought that a lack of exactly once delivery guarantees was a bug...

If you can get at-least-once delivery, why can you not build exactly-once on top of that? [UPDATE] Apparently I need to be more explicit about this. My question is: if I can get at-least-once delivery, why can I not build an abstraction layer on the receiving node that provides the illusion of exactly-once delivery? It seems like it should be a simple matter of keeping a log of received messages, and discarding dupli…

You can get exactly once processing, but not exactly once delivery.

https://bravenewgeek.com/you-cannot-have-exactly-once-delive...

Re: Falsehoods programmers believe about TCP

#85

I find this "falsehoods programmers believe" format of making pointed claims that you intentionally don't clarify to be unhelpful and obnoxious

I don't think you're taking into account the context or intended audience. It's a casual forum message posted in reply to someone else's message. They have not written a "falsehoods programmers believe" article. They have proposed that one ought to be written and have given a starting point for what it might cover. They offered their list to "get the ball rolling", confirming that they don't see it as a finished prod…

[deleted]

Re: Falsehoods programmers believe about TCP

#86
post #2

> remember, all of the following statements are false at least some of the time, but for some of these, perhaps not very often > 5. There is a such thing as a TCP packet > 6. There is no such thing as a TCP packet I don't understand this at all. Either the concept of a TCP packet exists, or the concept does not exist. Even it's not being used in certain scenarios, I don't see how you can argue that "there's no such t…

Perhaps it could be rescued by rephrasing them as "is always" versus "is never"?

Re: Falsehoods programmers believe about TCP

#87
post #75
post #72

Earlier quoted context omitted.

Because 'exactly once' delivery is arguably a misnomer, you usually really want 'at least once delivery with acks and idempotent processing on the other side'. The difference is subtle but important in practice and specification.

> you usually really want 'at least once delivery with acks and idempotent processing on the other side'. Why? I'm pretty sure I really want (the illusion of) exactly-once delivery, and it seems to me that I can implement that pretty easily given at-least-once delivery. Why would I not want that? > The difference is subtle but important Why?

> I'm pretty sure I really want (the illusion of) exactly-once delivery

Do you know what idempotency is? This is exactly what he described.

Idempotency is important to prevent unwanted behaviour for duplicate actions. If you have "exactly-once", and accidentally execute the action twice that could cause problems.

Re: Falsehoods programmers believe about TCP

#88
post #57

Earlier quoted context omitted.

I wouldn't, unless you've got a really solid understanding of your datacenter network and it's 100% good all the time. Which is unlikely, from my experience as a server person. If you've got dirty optics between two switches, now you're getting packet loss and TCP rears its head. Hopefully it's not an issue now, but diagnosing microbursting[1] was lots of fun, and really wigs TCP out. I've also run into 'fabric conge…

I was always suspicious about self-hosted high availability solutions (typically just diagrams, not yet implemented) that included redundant switches. Given how generally reliable switches are, I was inclined to believe that a misconfiguration or flaky network cable on one switch was more likely to cause a downtime (or significant degradation) than an outright switch failure, so adding another switch was doubling the…

It kind of depends. You do get some weird stuff to debug, and more connections = more likely that one of them is broken.

Otoh, if you ever do any scheduled maintenance on your switches (which is likely if they're doing anything fancy), having properly setup redundancy means you can announce a likely brief loss of redundancy, rather than a likely brief full loss of connectivity. If you have the right knobs, you can gracefully fail out the switch under maintenance and everything goes smoothly. Of course, sometimes you reboot the redundant switch and it confuses the other one and servers lose connectivity anyway.

Re: Falsehoods programmers believe about TCP

#89
post #61

I find this "falsehoods programmers believe" format of making pointed claims that you intentionally don't clarify to be unhelpful and obnoxious

Yep, I work on low level networking software professionally and this post is largely meaningless dribble and is probably motivated by grandstanding. It’s like an engineer who says “how does a screen show black” and then says “nope” to every response. It’s maybe a way to make people think, but beyond that the negativity and grandstanding of it is ultimately a turn off for many receivers which eventually either then ha…

Uhhh....how does the screen show black?

Re: Falsehoods programmers believe about TCP

#90
post #2

> remember, all of the following statements are false at least some of the time, but for some of these, perhaps not very often > 5. There is a such thing as a TCP packet > 6. There is no such thing as a TCP packet I don't understand this at all. Either the concept of a TCP packet exists, or the concept does not exist. Even it's not being used in certain scenarios, I don't see how you can argue that "there's no such t…

I guess it’s talking about how the TCP data stream is segmented into IP packets. From the IP point of view, there are packets; from the application point of view there is a data stream; but it’s more complicated than that. Applications have some control over when TCP’s PSH flag is set, roughly speaking, at the end of each write(); and that in turn affects segmentation because small pushed writes cause small packets. But if the sender can’t send straight away then buffered data doesn’t preserve write() boundaries and will be sent with large packets.
Post reply on HN