5 ms·
The the root cause is always buffers? That's it? Nothing ever gets lost for some other reason, maybe some sort of collision?
by lordnacho 10y ago
The the root cause is always buffers? That's it? Nothing ever gets lost for some other reason, maybe some sort of collision?
- monocasa 10y agoThere aren't a lot of true bus topologies out there any more for collisions to occur on. And Wi-Fi retransmits.
- mcguire 10y agoSo does wired ethernet.
- TallGuyShort 10y agoJust to be clear, you mean Wi-Fi retransmits in the case of a collision a-la Ethernet, right? Was talking to someone a while ago who was under the impression that a TCP packet that didn't get ack'd within a certain window might be retransmitted by a Wi-Fi router that was closer to the destination. I was pretty certain it was wrong, but since you said, "Wi-Fi retransmits", just checking that's not what you meant.
- monocasa 10y agoYeah he's wrong, routers don't buffer for downstream reasons in any context I've seen. That being said, Wi-Fi retransmits on more than just collisions. Under the hood, Wi-Fi actually has it's own acknowledgement protocol beneath the Ethernet layer. The idea is that with electrical bus protocols like Thicknet, each tap has a pretty good view of the whole bus. For wireless you might see your own frames just fine, but the destination might not. So you need to retransmit not just when you see collisions, but when the destination hasn't explicitly acknowledged your packets.
- deleted 10y ago[deleted]
- TallGuyShort 10y agoThey explicitly don't go into what happens on the routers between sender and receiver. Congestion control is a huge part of TCP's design. Don't know how common it is these days, but that is another place where packets will just get dropped. TCP packets get dropped too, but detecting that, resending, and then throttling back is built into the protocol. With UDP you either don't care or you handle that differently higher in the stack.
- grobbles 10y agoThen their article should be "because they do". Pointing out one tiny, seldom the cause of UDP packet drops is literally worse than useless.
- mcguire 10y ago"lost in transit "It's possible that you send a UDP packet in the internet, and it gets lost along the way for some reason. I am not an expert on what happens on the seas of the internet, and I am not going to go into this." Well. Ok.
- grobbles 10y ago[I realize this comment will be Dead. I disagreed with one of Dang's friends once, and via the brilliant moderation of HN...] There are countless ways UDP packets get dropped, and this submission, currently sitting on top of HN, demonstrates the utter decline of this site. Some veneer of sort of information that doesn't even remotely cover the topic, can be consumed in seconds, and makes everyone feel smarter, despite not being smarter at all. Eh.
- jsnell 10y agoThere's all kinds of other reasons: - Packet gets corrupted. A bit in the right place could cause it to be dropped or delivered to the wrong destination. - Something goes wrong on the PHY layer, say a dodgy fiber connection between two nodes. It'll then get dropped due to Ethernet CRC mismatches. - There are network nodes whose primary reason for existing is selectively dropping packets. For example traffic shapers, firewalls.
- robohamburger 10y agoI think there are other IP/routing reasons why an IP packet could get dropped for example if it needs fragmenting but has the no fragment bit set. Also if the TTL runs out from the packet being forwarded too many times. I imagine all the fancy routing protocols people use could end up dropping a packet. Maybe that can be lumped in with traffic shapers and firewalls? Fun story about randomly dropping UDP: comcast did that when they first started doing traffic shaping and it ruined my team fortress classic games. I assume there must be a better way than dropping packets. Maybe buffers :) ?
- jsnell 10y agoQueuing tends not to be a great traffic shaping strategy. The problem is that the sender will almost certainly not react to the extra queuing delay in any way (nobody runs RTT-sensitive congestion control in practice). And if the sender doesn't react to the queuing, it'll fill up the buffer and the same amount of packets will be dropped anyway. So you got increased RTTs and no reduction in packet loss. There is a better way of doing shaping for TCP traffic, by making the sender reduce the rate of transmission by other means than dropping packets. For example via manipulating the receive window. (And other, more sophisticated variations on that). But these methods aren't applicable to UDP in general, at best to some small subset of UDP-based protocols.
- AstralStorm 10y agoEven TCP Reno is sensitive to RTT and if it's ubiquitous. Likewise common Linux BIC and CuBIC. Plenty of VoIP and video streaming protocols also handle RTT hikes.
- kazinator 10y agoIt could also be data corruption. Some bits flip in the header, and either the UDP fails a checksum validation, or gets misrouted. There are also software reasons. A network stack is configured for some maximum UDP size and a datagram exceeds that size. On Mac OS X, the default maximum is just a little over 9200 bytes; you have to sudo sysctl -w net.inet.udp.maxdgram=65535 The buffer space is there; this is an administrative policy reason for packets being tossed. Datagrams can be dropped due to being unroutable. Some router gets rebooted, and so its peers drop packets. TCP connections keep going after a little pause; UDP sessions lose datagrams. Lastly, IP datagrams are dropped if their TTL (time to live) decrements to zero as they cross a router, even if they are otherwise routable, not too big for any buffer, and with a correct checksum.
- tcoppi 10y agoThey didn't go into the number of ways packets can be lost inbetween the sender and receiver. In my experience it is generally some small corruption at some point that causes the IP or ethernet checksum/CRC to fail and the packet gets dropped. It is extremely uncommon nowdays and generally due to failing hardware, buffers are by far the most common cause.
- AstralStorm 10y agoExcept on any kind of wireless network or ADSL (due to unstable high frequency channels over crummy phone cable).
- _pmf_ 10y ago> The the root cause is always buffers? That's it? Nothing ever gets lost for some other reason, maybe some sort of collision? Indirectly; lots of collisions put stress on the buffer, so the probability that the buffer will be exhausted will increase. Of course, if an intermediary router fails after sending the message, a UDP packet will also be silently dropped.
- Matthias247 10y agoMostly not. But she wrote that she has no idea about how the internet (or probably communications in general) works: Communications channels can be described by certain channel capacity as well as a signal to noise ratio (SNR). The lower the SNR the higher the chance of losing information (packets or parts of them). Encoding and error correction can help to a certain extent, but will lower the throughput. Whatever you do, Theres always a chance > 0℅ to lose something. On wireless connections much higher. If internet on your mobile doesnt work properly it's much more because of this and not because of overloaded buffers. The extreme case would be a cut cable, which leads to a SNR of 0. Depending on the medium and topology other errors can Happen, e.g. routing errors. Im surprised that nothing like this is mentioned, isnt that undergraduate university stuff?
- mzs 10y agoYes that's the most common. Assuming good hardware and application software the one I see second most often is when a UDP packet which is more than one IP fragment goes-out but an ARP has to happen only one of the IP fragments is then sent so the other end can't combine them. This is an old BSD network stack bug that lives on in hardware and software out in the wild to this day.