SYSTEM-DESIGN
    intermediate

    Real-Time Protocols

    Software Engineer path · lesson 76 of 99
    Short Polling
    Long Polling
    SSE
    WebSockets

    Which protocol is this?

    Sort

    Sort each description into the real-time technique it describes.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Short polling

    Drop items here

    Long polling

    Drop items here

    Server-Sent Events

    Drop items here

    WebSocket

    Drop items here
    7 pieces left to place

    Test your knowledge

    21 questions
    Question 1 of 21
    Score: 0

    A user types a message AND receives replies from teammates in the same session. Which property of the chosen protocol is essential?

    The short version

    Short Polling is repeatedly asking "Are we there yet?". Long Polling is asking once, and the driver stays silent until you arrive, but then you have to immediately ask again. SSE is a radio broadcast from the driver. WebSockets is a walkie-talkie connection left permanently on between you and the driver.

    In more depth

    Real-Time Communication Protocols

    When a client needs live updates from a server (e.g., Chat app, live scores), standard HTTP requests are not always the best tool.

    The Evolution

    1.Short Polling: Client spams the server every second. High overhead, wastes bandwidth.
    2.Long Polling: Client asks the server. The server leaves the HTTP connection open until it has data, then responds. Better, but still requires establishing a new connection after every message.
    3.Server-Sent Events (SSE): Client establishes an HTTP connection. Server pushes data down that pipe indefinitely. Unidirectional (Server -> Client).
    4.WebSockets: A persistent, bi-directional, full-duplex TCP connection. Both sides can push data instantly.

    Interview Questions

    Robinhood
    Bloomberg
    Google
    Google
    Meta
    Cloudflare
    Discord
    Netflix
    Cloudflare

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required