Four different measurements
Bandwidth often refers to link capacity. State whether a number describes capacity, measured throughput, or useful application throughput.
Useful application throughput is also called goodput; it excludes protocol overhead and repeated data.
A 100 Mbps connection can have high latency.
An application that needs 2 Mbps can still perform poorly on it because packets wait in queues.
State the endpoints of every delay
Round-trip time, or RTT, measures a journey to a peer and back. One-way delay measures a journey in one direction. The two directions can use different paths and experience different queue delays. Do not assume that measured RTT divided by two gives an accurate one-way measurement. Glass-to-glass latency starts at camera capture and ends at display. It includes encoding, network transfer, buffering, decoding, and rendering. A transport RTT excludes many of these stages. Measure elapsed time within one process with a monotonic clock. A monotonic clock does not jump when the wall clock changes. Comparing timestamps from different hosts requires clock synchronization and an estimate of its error.Work through a streaming budget
These numbers are a teaching example, not a TeleQuick benchmark. Assume each listed stage adds sequentially to one frame’s delay.
For a 100 ms target, this example leaves 10 ms of headroom.
If the viewer buffer grows from 25 ms to 70 ms, the total becomes 135 ms.
Making the relay one millisecond faster cannot recover that increase.
Measure the stage that changed before choosing an optimization.
Serialization and queues
Serialization delay is the time needed to place a packet’s bits on a link. For a simplified 1,200-byte packet on a 10 Mbps link:Jitter buffers trade delay for continuity
A jitter buffer holds incoming media briefly to absorb variation in arrival time. A larger buffer can tolerate more variation but delays playback. A smaller buffer reduces waiting but increases the chance that a packet misses its playback deadline. Neither choice is correct for every application. A recorded lecture and a live conversation can justify different delay targets. State the target before changing the buffer.Loss and deadlines
Reliable delivery does not guarantee delivery before a deadline. A retransmitted message can arrive correctly after it is useful. Conversely, some media data remains useful after a brief retransmission delay. Choose a delivery policy from dependencies and deadlines, not just from whether the data is audio or video. For robot commands, transport reliability alone does not establish safe behavior. The application also needs command expiry, acknowledgments where appropriate, and behavior for lost communication. The robotics lesson discusses that distinction.Lab: calculate the budget
Save this standard-library script aslatency_lab.py:
python3 latency_lab.py, or py -3 latency_lab.py on Windows.
The expected output is:
Exercise
- The relay-to-viewer delay increases by 20 ms. What is the new baseline total?
- Why does increasing link capacity sometimes leave glass-to-glass latency unchanged?
- Can a 40 ms RTT establish a 20 ms one-way delay?
- A 20 ms audio frame arrives 100 ms after its playback deadline. What should the playback policy consider?
Worked answers
Worked answers
- The total becomes 110 ms. It exceeds the 100 ms target by 10 ms.
- The delay can come from encoding, buffering, or rendering instead of a capacity bottleneck.
- No. The directions can be asymmetric. Use a suitable measurement method and state its uncertainty.
- Consider discarding the stale frame and concealing the gap. Playing it late can disrupt timing and increase delay.