All entries

    Polling vs SSE vs WebSockets for Job Progress

    Use a progress bar for a document export to compare three transports with the same contract: a job ID, a monotonically increasing revision and a terminal status.

    A night-market operator compares three delivery and progress displays
    Conceptual pixel-art illustration.

    Use a progress bar for a document export to compare three transports with the same contract: a job ID, a monotonically increasing revision and a terminal status.

    Build the example

    Polling asks for the latest snapshot at an interval. Server-sent events keep an HTTP response open for server-to-client updates and can resume from a last event ID if the server supports replay. WebSockets carry traffic in both directions, but connection restoration, heartbeats and replay remain part of the application protocol. Cancellation can remain an ordinary POST with any of the three.

    Use the same three snapshots for each implementation. A queued job starts at revision 1, the worker reports 40% at revision 2, and success appears at revision 3. Replay revision 2 after revision 3 and require the display to stay complete. This exercise separates message transport from correctness of the progress reducer.

    Watch the failure boundary

    Use the request count and recovery behavior to choose a first implementation. For an internal tool with occasional viewers, polling may cost less engineering time than adding a stream. For a wallboard that tracks live fleet changes, a shared stream may remove repetitive reads. If a transport loses history, retrieve a current snapshot before applying live deltas.

    Verify the behavior

    At 100 open viewers and a two-second polling interval, expect about 50 status requests per second while all are active, before retries. Compare that load with 100 open streams. Cut the connection at revision 4, advance the server to 6, reconnect and verify that each transport converges to 6 without moving the progress bar backwards.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 32
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    Use the request count and recovery behavior to choose a first implementation. For an internal tool with occasional viewers, polling may cost less engineering time than adding a stream. For a wallboard that tracks live fleet changes, a shared stream may remove repetitive reads. If a transport loses history, retrieve a current snapshot before applying live deltas.

    Meet the author
    THE CONVERSATION

    Your side of the story.