[Gllug] [OT] Lost packets

Andy Millar andy at andymillar.co.uk
Thu Jul 2 13:21:05 UTC 2009


On Thu, 2009-07-02 at 14:14 +0100, James Courtier-Dutton wrote:
> If I have a UDP packet one side of the network, and I want to send it
> to the other side of the network. What is the best way to ensure the
> information contained in the packet gets through within 1 second
> without being lost.

Forgive me for being ignorant, but isn't this largely what TCP is for?

> Example solution:
> Duplicate the packet at the sender with a delay of 200ms, so that when
> there is a failure and autoswitch within the network that would drop
> one packet, will not drop the second packet. Add a de-dupe function at
> the receiving end.
> 
> Can anyone think of any other solutions?

A -> B: SYN (read packet data)
B -> A: ACK (read: acknowledgement of receiving packet)

As long as you include a sequence number in your packets, you can then
retransmit again (perhaps after network round trip latency + application
latency + some tuned amount to prevent excessive retransmission) if the
ACK isn't received.

You could then trivially de-dupe and re-order on receipt.

How would you handle failed connections, where it would be impossible
for your packet to reach its' destination within the 1 second deadline?

Andy
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list