Cookie

This site uses tracking cookies used for marketing and statistics. Privacy Policy

  • Home
  • FAQs
  • What is the difference between WebSockets and polling?

What is the difference between WebSockets and polling?

Polling means the client sends an HTTP request every N seconds asking if anything changed. At 10,000 clients polling every 3 seconds, that is 3,333 requests per second on a quiet server. WebSockets maintain a persistent connection. The server pushes updates only when something changes. Zero requests when nothing changes. For any MERN application with real-time requirements, Socket.io WebSockets is always the correct answer over polling.