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

2

8

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

Quintic answered 4/8, 2016 at 18:21 Comment(1)
Why not look up the RFC?Convolute
G
15

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.
Graupel answered 15/9, 2016 at 18:38 Comment(1)
I think the purpose of the protocol is to deliver a stream of bytes to the application. How many times it's processed is an application concern, but the protocol itself delivers exactly once.Springs
T
0

Exactly once is clearly impossible. What if the network connection is severed and never recovers?

Tripitaka answered 4/8, 2016 at 18:25 Comment(1)
I'm not sure that applies here because then at-least-once would also be impossible. I think these semantics assume some level of connectivity always eventually recovers - but i could be wrongQuintic

© 2022 - 2024 — McMap. All rights reserved.