DEV Community

Anusree Anilkumar
Anusree Anilkumar

Posted on Originally published at anusree6154s.github.io on

SSE vs Websocket

SSE vs Websocket

(Rest api still always better than these open connections)

  • SSE
    • Server sent events.
    • way for server to continuously push updates to a client via HTTP. one-way
    • switch (notification, live dashboard, logs, tokens)
  • Web socket
    • continuous message from both client and server.
  • both use an open connection (not polling). SSE uses HTTP connection. websocket starts as HTTP and then upgraded to websocket protocol where messages are exchanged as websocket frames. (chat apps, game, collab editing)

Top comments (0)