Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does TCP (Transmission Control Protocol) provide at-most-once, at-least-once or exactly-once delivery

I've heard it said that providing exactly-once delivery is almost impossible. At the same time, TCP is said to provide guaranteed delivery. If TCP does not provide exactly-once guaranteed delivery then does it provide at-most-once or at-least-once

like image 417
Mark Avatar asked Dec 19 '22 14:12

Mark


1 Answers

We could say that TCP provides at-least-once delivery and exactly-one processing, with regards to the following definitions:

  • At-least-once delivery: a TCP message will be delivered at least once to the destination. More specifically, it will keep re-transmitting with specific timeouts if no ACK(knowledgement) is received, so that it will eventually be delivered. However, if some of these re-transmissions were not lost (but just delayed), then more than one copies of the message will be delivered.
  • Exactly-once processing: each TCP message will be processed by the destination node exactly once. More specifically, the destination will watch out for duplicate messages (checking the IDs of each received message). So, even if a message is delivered twice, the destination node will only process it (pass it to the application level) once and ignore the duplicates received later.
like image 141
Dimos Avatar answered Apr 22 '23 20:04

Dimos