You probably wouldn’t use UDP if there’s anything important to miss. It’s meant for traffic where the latest state is gold, like multiplayer games, video calls etc.
But an application can have its own retry mechanism when using UDP with its own rules. Like sometimes old data is important, but not important enough to block the rest of transmission like TCP does.
Not necessarily and they didn't ask about another protocol, they ask about UDP. The Interviewer has to stay in this layer if he wants to demonstrate how it works.
The app won't surely know anything, because it's not built into the protocol. You can technically make UDP seem mostly sort of like TCP with a bunch of extra shims in compute, but that has nothing to do with the protocol used.
Also, Layer 5 is Session layer, where stream connections are managed. Layer 7 is application, where additional logic would need to be added to get UDP to pretend to have reliability. There are elements at layer 4 that would be used for implementing the sequencing needed, but app code would actually perform the handling. As per the name, the Session layer just ensure reliability for the connected session itself and not the individual packets.
And obligatory acknowledgement that the OSI model is just a model.
View all comments
Show parent comment
6
u/ElSucaPadre 2h ago
if we want to be fair, depends on which layer candidate and interviewer are.