Menu
Back to Discussions

real-time data sync, websockets vs. sse vs. polling? dont you know

Amira Hassan
Amira Hassan
·3015 views
hey everyone, im wrestling with how to best keep client UIs updated in near real-time. weve got a system where data can change frequently on the backend, and we need clients to see these changes fast without overwhelming the server. ive been thinking about WebSockets, Server-Sent Events (SSE), and simple polling. each has its pros and cons. WebSockets offer full duplex, but can be more complex to manage and might have issues with some proxies. SSE is simpler for server-to-client pushes, but isnt bidirectional. polling is the simplest, but can be inefficient and have higher latency. what are your experiences? when have you found each of these approaches to be the best fit, and what were the critical factors in your decision?
39 comments

Comments

Loading comments...