3 ms·
It exists to facilitate MTU discovery for DTLS (which is basically TLS over UDP). By using heartbeats a sender could send a message to the server and infer thro
by colmmacc 13y ago
It exists to facilitate MTU discovery for DTLS (which is basically TLS over UDP). By using heartbeats a sender could send a message to the server and infer through responses and non-responses (and maybe some kind of binary search) what the path MTU is.
I'm not clear on why layer-7 level MTU discovery is preferable to regular ICMP-based pMTUd, which actually does work with UDP (though you have to use recvmsg in a very complicated way) or why fragmented datagrams would be much of a problem in the first place - but that's the reason.
It isn't useful for TLS over TCP, except maybe as a network timing channel.
- jmalicki 13y ago> I'm not clear on why layer-7 level MTU discovery is preferable to regular ICMP-based pMTUd, which actually does work with UDP (though you have to use recvmsg in a very complicated way) One big reason is that it's really, really common for ICMP messages to be dropped by firewalls, which is really unfortunate. Doing it at the protocol layer ensures that such misconfigured routers don't cause problems for the application. > or why fragmented datagrams would be much of a problem in the first place - but that's the reason. Packet loss. If there is 1% IP packet loss, and datagrams are barely over 1 MTU and thus fragmented into two IP packets (such as when an intermediate link uses IPsec encapsulation, so the IP packet itself gets a little smaller), you have 1 - (.99)^2 = 1.99% datagram loss. Splitting up the datagrams gets you down to 1% datagram loss, same as the IP packet loss. Much worse for larger datagrams.