1. Home
  2. Blog
  3. Custom Software

Custom Software

WebSockets vs SSE vs Polling: How to Choose Real-Time Updates for a Business App

WebSockets vs SSE vs polling: how to choose real-time updates for a business app. Load, delay, reconnecting, scaling and payback, with worked examples.

Contents 12 sections
  1. What Are Real-Time Updates, and Why Is a Choice Needed?
  2. What Is the Difference Between WebSockets, SSE and Polling?
  3. How Do the Methods Compare on Load and Delay?
  4. If the Connection Drops, Are Events Lost?
  5. How Are Slow Clients and Backpressure Managed?
  6. How Does an Event Reach Everyone When There Are Several Servers?
  7. How Are Authorization and Session Lifetime Protected on a Long-Lived Connection?
  8. When Is Polling Enough?
  9. How Is the Payback of Real-Time Updates Calculated?
  10. How Do You Set Up Real-Time Updates? Six Steps
  11. Live-Updating Business Applications with İnovabil
  12. Frequently Asked Questions

The warehouse team keeps refreshing the shipping board, and dealers reload the page just to see whether an order status has changed. Real-time updates remove that waiting: the moment data changes, the screen updates by itself. The real question is how to deliver them: polling, where the client keeps asking; server-sent events (SSE), where the server streams in one direction; or WebSockets, where both sides talk freely. This guide settles WebSockets vs SSE vs polling with numbers.

We compare the three methods for 5,000 concurrent users across load and delay, reconnecting, scaling, authorization and payback. All figures are representative examples, not measurements of any particular product or infrastructure; verify them with your own load tests.

Key takeawayBefore choosing a method, fix two numbers: the average delay the business can accept and the number of users connected at once. With polling, load is users divided by the interval, and shortening the delay raises load by the same factor. With SSE and WebSockets, load is the number of open connections and delay stays low; the price is that you must manage connection lifetime, reconnecting and authorization yourself.

What Are Real-Time Updates, and Why Is a Choice Needed?

Real-time updates mean a change on the server reaches the screen within seconds, without the user reloading. It does not have to be instant; the business defines an "acceptable delay": 2 seconds on a warehouse board, perhaps 30 seconds on an approval screen.

A choice is needed because the web's basic model is the client asking and the server answering, and the three methods work around that limit in different ways. For server-to-server notifications see our webhook guide, and for internal distribution see our message queue article; this one covers only carrying live data to the client.

We recommend reading: What is event-driven architecture? How services talk without calling each other

What Is the Difference Between WebSockets, SSE and Polling?

With polling the client asks at a set interval, "is there anything new?". With SSE the client connects once and the server streams events down the same connection, in one direction only. With a WebSocket the connection stays open and either side can send a message at any moment.

TopicPollingSSEWebSocket
DirectionClient asks, server answersServer to client onlyTwo-way
ConnectionEach poll is a separate short requestOne long-lived HTTP connectionOne long-lived connection, its own protocol
ReconnectingNot needed; the next poll carries onBrowser retries itself and can send the last event IDYou write it: wait, ID, resume
Proxy and network fitBest; it is an ordinary requestGood; plain HTTP, but idle timeouts can applyMay be blocked on some corporate networks and proxies
DelayHalf the interval on averageLowLow
Typical useSlow-changing status, reportsOrder status, live board, notificationsShared editing, chat, two-way commands

Long polling holds the request open until something changes; it is a middle path where network limits are strict. On mobile, the operating system may close background connections, so use the flow in our mobile push notification guide.

How Do the Methods Compare on Load and Delay?

Take 5,000 dealers keeping an order status board open. The information on each screen changes about every 60 seconds on average, and one poll takes 40 milliseconds (representative).

Polling at a 5-second interval: 5,000 ÷ 5 = 1,000 requests/s. Average delay is interval ÷ 2 = 2.5 s, worst case 5 s. Because the data changes every 60 seconds, only 1 poll in 60 ÷ 5 = 12 carries news; 11 ÷ 12 ≈ 91.7% come back empty, about 917 pointless requests per second. Requests in flight at once: 1,000 × 0.04 = 40.

Polling at a 1-second interval: 5,000 requests/s and an average delay of 0.5 s. Delay fell 5 times and load rose 5 times: delay × load is 2.5 × 1,000 = 0.5 × 5,000 = 2,500 in both cases, so you cannot improve both together.

SSE or WebSocket: 5,000 open connections. If each user gets one event every 60 seconds, that is 5,000 ÷ 60 ≈ 83.3 messages/s; a small heartbeat every 30 seconds to show the link is alive adds 5,000 ÷ 30 ≈ 166.7 messages/s. Total ≈ 250 messages/s. Delay is network plus processing time, about 0.1 s in the example.

Measure (5,000 users)Polling 5 sPolling 1 sSSE / WebSocket
Work reaching the server1,000 requests/s5,000 requests/s≈ 250 messages/s
Open connectionsShort; ≈ 40 requests in flight≈ 200 requests in flight5,000 open connections
Average delay2.5 s0.5 s≈ 0.1 s
Empty responses≈ 91.7%≈ 98.3%None; heartbeat only
Data volume (1,000 bytes per request, 100 bytes per message)1 MB/s5 MB/s25 KB/s

Check: at a 1-second interval 59 of 60 polls are empty (98.3%); 5,000 × 0.04 = 200 requests in flight; 1,000 × 1,000 bytes = 1 MB/s against 250 × 100 bytes = 25 KB/s, a 40-fold difference. Push pays in memory instead: at 50 KB per connection, 5,000 × 50 KB = 250 MB.

Load for the same 5,000 users: 5-second polling 1,000 requests, 1-second polling 5,000 requests, SSE or WebSocket 5,000 open connections; at a 0.5-second target polling needs 15 servers and push 2
Same 5,000 users, three methods, three different loads.

You can keep polling cheap by making unchanged responses tiny; we cover the limits in our caching guide.

If the Connection Drops, Are Events Lost?

They can be, so an event stream must be designed to resume where it left off, not as "send and forget". Representative example: 3 drops per user per day, each 20 seconds. If an event arrives every 60 seconds, each drop misses 20 ÷ 60 ≈ 0.33 events, so about 1 event per day; across 5,000 users that is roughly 5,000 missing updates a day.

The fix has these parts:

  1. Event ID: Every event carries a sequential ID, and the client remembers the last one it received.
  2. Short-lived event log: The server keeps the last few minutes of events; over 5 minutes that is 83.3 × 300 ≈ 25,000 events, about 12.5 MB at 500 bytes each.
  3. Resume: The reconnecting client sends its last ID and the server replays what came after. SSE browsers do this on their own; with WebSockets you write it.
  4. Snapshot if the window is exceeded: If the outage is longer than the log, the client fetches the current state instead of replaying events, then joins the stream.
  5. Random wait (jitter): After a server restart, 5,000 clients must not reconnect together. Spreading them over 0–30 seconds cuts the rate to 5,000 ÷ 30 ≈ 167 connections/s; without it, 5,000 arrive in one second.
Reconnect flow: link drops, last event ID kept, random wait, reconnect with last ID, fetch missed events from the log, return to the live stream
A dropped connection returns to the live stream without losing events.

As a safety net, fetch the current state with a normal request when the board opens and verify every 5 minutes: push is for speed, and a snapshot provides correctness.

How Are Slow Clients and Backpressure Managed?

Each client's send buffer must have a limit; when it is exceeded, old events are dropped and the client resyncs to the latest state. An unbounded buffer quietly fills server memory.

Representative limit: 200 messages per client at 500 bytes each, 200 × 500 = 100 KB. If everyone filled their buffer, the worst case is 5,000 × 100 KB = 500 MB; for just 100 slow clients, 100 × 100 KB = 10 MB. When the limit is hit you have two options: merge intermediate states of the same object and send only the latest (if an order went "prepared" then "shipped", send only "shipped"), or empty the buffer and tell the client to resync. For order status the latest value matters and merging is cheap; for an ordered transaction log you never drop events, you resume the client from the log.

How Does an Event Reach Everyone When There Are Several Servers?

Each server sends only to its own connected clients, and a broadcast channel distributes the event to all servers. The service that processes the order publishes the event to the channel, every connection server subscribed to it forwards it to the relevant clients, and the publisher never needs to know which server a client is on.

Assume a load test shows one server safely carries 3,000 connections (representative). For polling, assume 500 requests/s per server at a 70% target load, so 350 requests/s.

Target average delayPolling intervalRequest rate (5,000 users)Polling servers (350/s)Push servers (3,000 connections)
15 s30 s166.7/s12
5 s10 s500/s22
2.5 s5 s1,000/s32
0.5 s1 s5,000/s152

The math: 166.7 ÷ 350 = 0.48 → 1; 500 ÷ 350 = 1.43 → 2; 1,000 ÷ 350 = 2.86 → 3; 5,000 ÷ 350 = 14.3 → 15; for push 5,000 ÷ 3,000 = 1.67 → 2. As the delay target tightens, polling cost climbs quickly while push stays flat; when it is loose, polling runs on one server.

If users grow to 20,000, push needs 20,000 ÷ 3,000 = 6.67 → 7 servers, 8 with a spare; if one fails, 20,000 ÷ 8 = 2,500 clients reconnect (spread over 30 seconds, 2,500 ÷ 30 ≈ 83 connections/s). For growth planning, use the capacity and load-test approach in our scalability guide.

How Are Authorization and Session Lifetime Protected on a Long-Lived Connection?

Authorization must be enforced for the whole life of the connection, not just when it opens. An ordinary request checks the session every time; a long connection may be verified once and stay open for hours. If a user with a 15-minute session keeps receiving data after it expires, the session limit has effectively been lifted.

  • Connection lifetime must not exceed session lifetime: Close the connection when the token expires, or renew it with a new token. For 5,000 users, a check every 15 minutes is 5,000 ÷ 900 ≈ 5.6 verifications/s, a negligible load.
  • The server decides channel access: A client cannot say "give me this dealer's orders"; the server decides from the verified identity which channels to subscribe it to. This is object-level authorization applied to the live stream.
  • Close on permission change: If a role is removed or an account closed, the open connection ends at once.
  • Keep tokens out of the address: Addresses end up in logs and history; use a short-lived single-use ticket.
  • Keep events small: Carry only the ID and status and fetch details through a secure request. For personal data obligations, consult your legal counsel.

Our admin panel design guide is a useful companion for roles and permissions in general.

When Is Polling Enough?

If an average delay of 15 seconds or more is acceptable and the user count is modest, polling is usually the cheapest and most robust path. In the table, a 30-second interval is 166.7 requests/s and one server covers it; reconnecting and backpressure never come up.

SituationRecommendationReason
Report and summary screensPolling (30–60 s)Delay is unimportant, simplicity is valuable
Order status, live board, notificationsSSEOne-way stream, automatic reconnecting, plain HTTP
Shared editing, chat, live commandsWebSocketTwo-way and frequent messages
Restricted network or frequent disconnectsPolling or long pollingMost compatible and forgiving method
Mobile backgroundPush notificationThe operating system does not keep the connection alive

A practical rule: the business sets the average delay G, and the polling interval becomes 2 × G. If the request rate at that interval (users ÷ interval) stays under 70% of server capacity, polling is enough. If it does not, or if G is below a few seconds, consider SSE or WebSockets.

We recommend reading: How to design dashboards and data visualization

How Is the Payback of Real-Time Updates Calculated?

The gain comes from live updating itself; the method only sets its cost. Representative example: 30 warehouse staff using the shipping board lose an average of 20 minutes a day to manual refreshing and late updates.

The loss: 30 × 20 min = 600 min = 10 h/day; for 22 days, 220 h per month; at ₺300 per hour, ₺66,000/month. With live updates the loss falls from 20 to 5 minutes (−75%), so the gain is ₺66,000 × 0.75 = ₺49,500/month. Running cost: 2 push servers × ₺4,000 = ₺8,000 plus ₺1,500 for monitoring, ₺9,500/month in total. Net per month: ₺49,500 − ₺9,500 = ₺40,000. If the investment (event stream, reconnecting, authorization, testing) is ₺240,000, payback is 240,000 ÷ 40,000 = 6 months.

If only half the gain materializes: ₺24,750 − ₺9,500 = ₺15,250/month and 240,000 ÷ 15,250 ≈ 15.7 months. If 2.5 seconds of delay is acceptable, 5-second polling does the same job with 3 servers (₺12,000/month). The figures are representative; calculate with your own values.

How Do You Set Up Real-Time Updates? Six Steps

  1. Write down the delay target. Set the acceptable average delay for each screen in seconds.
  2. Work out direction and volume. One-way or two-way; how many users, how often do events occur?
  3. Choose the method by calculation. Fill in the load and server table with your own numbers; if polling is enough, stop there.
  4. Build event IDs and a log. Design reconnecting up front.
  5. Add authorization, limits and a broadcast channel.
  6. Run load and drop tests. Test 5,000 connections, mass reconnecting and a slow client.

Live-Updating Business Applications with İnovabil

At İnovabil our focus is building bespoke software from scratch: custom software, ERP, CRM, e-commerce, web, mobile and integration. We built CRM, purchasing and mobile for Avcılar İnşaat; a purchasing system for İZBAN; logistics and shipment planning with wholesale order management for Karyak; and warehouse management plus a complaints and support management system for Sleepy.

If you need a live board or notifications, we suggest writing down the user count, the acceptable delay and the event frequency, and choosing the method with those numbers. We do not claim a separate real-time product or infrastructure service; it is one of the design decisions of the application. Send us a short summary and we will work out the decision together.

We recommend reading: Our software development process: from analysis to launch

Frequently Asked Questions

Should I choose WebSockets or SSE?

If data flows only from server to client (order status, live board, notifications), SSE is usually simpler and sturdier; it runs over plain HTTP and eases reconnecting. If the client also sends messages often (chat, shared editing), WebSockets fit better.

Is polling a bad method?

No. When a delay of a few tens of seconds is acceptable and the user count is reasonable, polling is the simplest, most compatible and easiest to maintain option.

Are events lost if the connection drops?

Not if the design is right. Each event gets a sequential ID, the server keeps the last minutes of events, and the reconnecting client resumes from its last ID.

How many concurrent connections can one server carry?

It depends on the application, message frequency and server; the 3,000 in this article is representative. Run a load test on your own scenario to find the safe limit.

Do real-time updates create a security risk?

They can if authorization and session lifetime are not managed separately on a long-lived connection. Limit connection lifetime to the session, decide channel access on the server, and close the connection when permissions change.

Let's talk about your project

Tell us briefly about the software you have in mind; we'll listen and prepare a tailored roadmap and proposal.

Get a quote