Stop Polling. Your Server Already Knows the Answer.
There's a pattern that shows up in codebases more often than it should: a frontend making repeated HTTP requests to check if something has changed. Every 2 seconds. Every 1 second. Sometimes faster. The server receives the request, looks around, finds nothing new, and responds anyway. Then it happens again.
This is polling, and it's the developer equivalent of refreshing your inbox manually every 30 seconds. It works, technically. It's also wasteful in a way that compounds quietly until it doesn't.
The real issue isn't performance overhead, though that matters. The issue is that polling inverts the natural flow of information. The server knows when something changes. The client doesn't. So instead of letting the server speak up when it has something to say, polling forces the client to keep asking. You've built a conversation where one side has to repeatedly say "anything yet?" just to get an answer the other side was already holding.
WebSocket flips that around.







