InterviewStack.io LogoInterviewStack.io

Transport Layer Protocols Questions

Comprehensive understanding of transport layer protocols, primarily Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), and related protocols used for diagnostics such as Internet Control Message Protocol (ICMP). Candidates should be able to explain TCP as a connection oriented, reliable, ordered, and flow controlled protocol including the three way handshake for connection establishment, the four step connection teardown, retransmission and timeout behavior, and high level congestion control and flow control mechanisms. Describe TCP header structure and key fields used for reliability and ordering. Explain UDP as a connectionless, best effort, lower latency protocol, its datagram model, simple header structure, and trade offs for reliability and ordering. Give real world use cases and justify protocol choice, for example reliable file transfer and web traffic versus low latency streaming, real time voice, and many DNS queries. Discuss port numbers and common service ports such as HTTP port 80, HTTPS port 443, DNS port 53, SSH port 22, and SMTP port 25, and how sockets and ports map to endpoints. Cover practical topics such as when UDP may fall back to TCP, how fragmentation and packet loss affect each protocol, and the role of ICMP for network diagnostics and error reporting.

EasyTechnical
0 practiced
Explain TCP TIME_WAIT: why it exists, what role it serves on the active closer, and implications for SRE tasks such as port reuse, server restarts, and ephemeral port exhaustion. Mention safe kernel knobs to consider and why options like tcp_tw_recycle were deprecated or problematic in NATed environments.
MediumTechnical
0 practiced
You run a service that maintains millions of WebSocket (long-lived TCP) connections. Explain the role of TCP keepalives and application-level heartbeats, how to choose keepalive and heartbeat intervals to balance resource usage and failure detection, and how NATs and proxies affect your design and timeout choices.
HardTechnical
0 practiced
Explain the TCP state transitions for graceful close (FIN handshake) and abrupt close (RST). Discuss edge cases such as simultaneous close, RST during handshake, and how race conditions or asymmetric routing can produce half-open sockets. As an SRE, which kernel metrics and logs would you use to detect and mitigate these issues at scale?
EasyTechnical
0 practiced
Give concrete real-world examples where you'd choose TCP and where you'd choose UDP for a cloud service. For each example justify the choice in terms of reliability, latency, head-of-line blocking, deployment complexity, monitoring implications, and client compatibility.
HardSystem Design
0 practiced
Design a globally distributed messaging service supporting 10 million concurrent long-lived TCP connections (WebSockets). Explain transport-layer concerns: per-node TCP connection limits, load balancer session affinity, NAT timeouts, connection draining during deployments, TLS termination options, and strategies to minimize the impact of cross-region latency and packet loss on user experience.

Unlock Full Question Bank

Get access to hundreds of Transport Layer Protocols interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.