Network overhead and application latency
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Before any separately authorized Docker query, verify the effective endpoint and builder (including environment overrides), not just the context name. Use only disposable lab resources; a failed check is a stop condition, not permission to retry against a different host.
Synthetic same-payload comparison (ms):A round-trip samples: 3, 4, 4, 5, 6 -> median 4B round-trip samples: 5, 6, 6, 7, 9 -> median 6Difference=2 ms; relative increase=50% from AA/B path sketch: client -> service vs client -> proxy -> serviceNo network traffic generated.Define whether latency includes DNS, TCP/TLS setup, application processing and response transfer. Reused connections and new connections answer different questions. Keep payload, concurrency, protocol, connection policy and server behavior identical; report errors and timeouts as well as successful latency. An added proxy can change buffering and connection reuse, so the median difference is an end-to-end difference, not a direct measurement of one network hop. Overlay and VM boundaries may introduce overhead; measure rather than assume. Throughput depends on bytes delivered per elapsed time and is not the reciprocal of single-request latency when requests overlap. Use an authorized private, bounded synthetic workload only for future runtime trials. Do not turn off TLS, firewall policy or isolation to chase speed; establish equivalent security requirements and verify correctness. The practice increase is 25% relative to 8 ms. Record whether DNS and connection setup occur in each trial and distinguish offered load from successfully completed requests. Compute goodput as verified application payload bytes delivered per measurement window, not as the inverse of median latency.
Common mistake
Do not interpret A/B application latency differences as proof of a specific networking implementation cost without isolating other factors.
Manual practice
Compare median latency 8 ms with 10 ms, calculate the relative increase, and describe two controls for DNS and connection reuse. Define a separate throughput measure for overlapping requests.
Worksheet: lab-fixtures/docker-performance-engineering/07-network-overhead/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Network overhead and application latency — Knowledge check
Interpret performance evidence and make a safe operational decision.
What is the median increase in the example?
Can that difference be assigned solely to the proxy hop?
Which condition should remain equivalent?