TCP or UDP

The two main ways to carry data: TCP, reliable and ordered, and UDP, light and without guarantees. How they work, their trade-offs, and how to choose for video, games, DNS or the web, up to QUIC and HTTP/3.

  • 43 cards
  • 3 topics
  • Free

The outline, topic by topic

Each topic is weighted the way the exam weighs it.

  1. TCP
  2. UDP
  3. Choosing

A few cards from the deck

  • TCP: what is it?

    Show the answer

    A connection-based transport protocol that delivers data reliably and in order

    Reliability has a cost: a handshake at the start and waiting for resends on loss.

  • Opening a TCP connection: after “SYN” (Client → Server), what is the next message?

    • ACK (Client → Server)
    • First data (Client → Server)
    • SYN-ACK (Server → Client)
    • Data acknowledgement (Server → Client)
    Show the answer

    SYN-ACK (Server → Client)

    The server's sequence number, acknowledgement of the SYN. The server accepts and announces its own number.

  • Acknowledgement (ACK): what is it?

    Show the answer

    The message by which the receiver confirms it got some data

    Without an ACK after a delay, the sender sends the data again.

  • Opening a TCP connection: after “SYN-ACK” (Server → Client), what is the next message?

    • SYN (Client → Server)
    • First data (Client → Server)
    • Data acknowledgement (Server → Client)
    • ACK (Client → Server)
    Show the answer

    ACK (Client → Server)

    Acknowledgement of the SYN-ACK. Both sides know each other's numbers.