3 ms·
Don’t Use Long Polling – Just Use WebSockets
- detaro 10y agoHow is distributing long-polled connections between servers more difficult than load-balancing websocket connections? To me the amount of state you have to manage seems basically identical?
- pedalpete 10y agoI've been looking at websockets vs short polling for an app we are building. Most of our service is being run through aws lambda, so websockets is not an option without running a separate service. I suspect this is a problem for many. Is it worth running an extra service to use websockets on a component of your app vs using polling. I've decided to implement polling for the first iteration, and we can always try websockets later. So, I wouldn't say "don't use polling", but websockets are a good solution I've used in the past, depends on the app and architecture.