WebSocket & Server-Sent Events: why and how?
summary
Compares WebSocket and Server-Sent Events (SSE) for real-time browser-server communication: WebSocket offers full‑duplex binary/text channels but can be blocked by proxies and often needs proxy/load‑balancer reconfiguration, while SSE is unidirectional text with built‑in reconnection and last-event-id recovery but lacks request headers (so authentication must use query-string workarounds). Discusses browser connection limits (~6–8 per domain) versus servers handling thousands of connections, and explains that HTTP/2 multiplexing resolves the per‑widget scaling problem; notes server-side support in Jetty, Tomcat and Spring.
AI-written summary · about
