Software Design

Long Polling vs Short Polling Network Flows

UML Sequence Diagrams · made in Skemio

Sequence diagram contrasting short polling with empty returns against long polling holding a request open until an asynchronous job event resolves.
Sequence diagram contrasting short polling with empty returns against long polling holding a request open until an asynchronous job event resolves.

What it shows

  • Short polling spams fixed interval GETs, wasting bandwidth on empty data
  • Long polling holds requests open until fresh data arrives or timeout occurs
  • Long polling cuts round trips drastically but ties up server worker threads

The takeaway

Choose long polling for simple event notifications without full WebSocket overhead.

More uml sequence diagrams