← Bytedance Interview Insights

Bytedance·Backend Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Bytedance backend screen, pretty standard networking fundamentals territory. One question, quick session, nothing too wild.

Questions Asked (1)

Q1

Can you explain what TCP and UDP are and walk through the key differences between them?

System DesignTechnical Trade-offs
Author's notes

Knew this one cold so I rattled off connection-oriented vs connectionless, reliability guarantees, ordering, handshake overhead.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining TCP and UDP at a high level, emphasizing their core design philosophies: TCP as a reliable, connection-oriented protocol and UDP as a lightweight, connectionless protocol. Then systematically compare them across key dimensions like reliability, ordering, speed, and use cases, and conclude by relating them to real-world backend scenarios such as choosing between them for microservices, streaming, or gaming.

Pro tip: Demonstrate maturity by discussing trade-offs in context: for example, explain why UDP is often preferred for real-time applications despite its lack of reliability, and how protocols like QUIC (HTTP/3) build reliability on top of UDP. This shows you understand that the choice depends on requirements, not just textbook differences.

1. Define TCP and UDP

Briefly explain that TCP is a connection-oriented, reliable transport protocol, while UDP is a connectionless, best-effort protocol. Mention that both operate at the transport layer of the OSI model.

2. Compare key characteristics

Walk through differences in connection setup (handshake vs. no handshake), reliability (acknowledgments, retransmissions vs. no guarantees), ordering (sequenced vs. unordered), and flow/congestion control (TCP has it, UDP does not).

3. Discuss performance and overhead

Highlight that TCP's reliability mechanisms introduce latency and overhead, making it slower but suitable for file transfers and web traffic. UDP is faster and more efficient for real-time applications like video streaming, VoIP, and gaming.

4. Relate to backend engineering use cases

Give examples of when to choose each: TCP for HTTP/HTTPS, database connections, and microservice communication; UDP for DNS, streaming media, and real-time multiplayer games. Mention that some systems use both (e.g., HTTP/3 uses QUIC over UDP).

5. Summarize trade-offs and decision factors

Conclude that the choice depends on requirements: reliability and order vs. speed and low latency. Emphasize that understanding these trade-offs is crucial for designing robust backend systems.

Key Points to Mention

  • TCP is connection-oriented (3-way handshake) and reliable (acknowledgments, retransmissions, ordering); UDP is connectionless and unreliable (no guarantees).
  • TCP has flow control, congestion control, and error checking; UDP has minimal error checking (checksum) and no flow/congestion control.
  • TCP is used for applications requiring data integrity (e.g., web, email, file transfer); UDP is used for time-sensitive applications (e.g., streaming, gaming, VoIP).
  • UDP has lower latency and overhead, making it suitable for real-time communication; TCP ensures data arrives correctly but may introduce delays.
  • Modern protocols like QUIC (HTTP/3) build reliability on top of UDP to combine speed with reliability.
  • Consider trade-offs: reliability vs. speed, order vs. independence, and connection state vs. statelessness.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.