Socket IO

R4 Cheng
Aug 16, 2021

--

HTTP long-polling

The HTTP long-polling transport (also simply referred as “polling”) consists of successive HTTP requests:

  1. long-running GET requests, for receiving data from the server
  2. short-running POST requests, for sending data to the server

Mechanism

  1. Client sends a request to Server, if Server has the data it will respond right away, otherwise it will keep the connection open until it has the data

References

  1. How it works
  2. Short Polling vs Long Polling vs WebSockets — System Design (2020.8)

Web sockets

Bi-directional

References

  1. Short Polling vs Long Polling vs WebSockets — System Design (2020.8)

--

--

R4 Cheng
R4 Cheng

Written by R4 Cheng

「0」が過去で「1」が未来「今」は何処にもない

No responses yet