Polling, Long Polling or SSE: What to Choose in Python?

An order changes status, an export finishes, a message arrives. The server knows, the browser doesn’t. Polling, long polling and Server-Sent Events (SSE) all answer that same question, and they often get mixed up because the result on screen looks alike. What separates them is who triggers the delivery and what silence costs, when nothing changes. Let’s look at how each one works, what it really costs, and why the simplest solution is often the right one. ...

October 5, 2026 · 7 min · Anthony
Polling, Long Polling or SSE: What to Choose in Python?

Server-Sent Events vs WebSocket: Which to Choose in Python?

As soon as a screen has to update without a page reload, WebSocket enters the conversation. Order tracking, export progress, notifications, an LLM answer appearing token by token: the reflex is to open a bidirectional channel. Yet in all of these cases, the client has nothing to say to the server once the connection is established. The Server-Sent Events (SSE) pattern meets exactly this need with a plain HTTP response that never ends. The choice goes beyond protocol preference. It determines what you get for free (reconnection, resumption, HTTP authentication) and what you will have to build yourself. Let’s compare the two in Python, with FastAPI and Django, all the way to the problems that only show up in production. ...

September 15, 2026 · 10 min · Anthony
Server-Sent Events vs WebSocket: Which to Choose in Python?

Newsletter

Get new articles delivered straight to your inbox.