Skip to main content
InterviewHubPRO
Section Overview
Q29

Question 29 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

58%
Networking & Protocols (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

What is SSE vs WebSockets in terms of HTTP/2 Multiplexing?

senior LevelHTTP & REST APIs

In Simple Words:

  • WebSockets over HTTP/1.1: Each WebSocket connection consumes a dedicated TCP socket. 5 open tabs = 5 persistent TCP sockets.
  • SSE over HTTP/2: Streams events over the existing shared HTTP/2 TCP connection alongside normal fetch requests via multiplexing, consuming zero extra sockets or ports!