# Real-Time Communication

> The Real-Time Communication (RTC) is the exchange of data, audio or video with delays short enough to feel instant.

## What is real-time communication on the web?

The exchange of messages, audio or video where the delay is small enough to feel instant, usually under a few hundred milliseconds. Chats, calls, multiplayer games and voice assistants depend on it, and plain request-response HTTP is too slow for them.

- Topic: Real-Time Communication
- Type: concept

## Common mistakes

- Polling an endpoint every second instead of keeping one open connection.

## Key points

- Data that must arrive instantly is pushed over a persistent connection, not fetched with repeated polling.
- The client reconnects automatically after the connection drops.
- Every incoming message is validated before it changes the UI or state.

## Interview questions

### WebSocket, SSE or WebRTC: which should I use?

SSE for one-way server updates, WebSocket for two-way messages like chat, WebRTC for audio, video or direct device-to-device data.

### How much delay still feels real-time?

For calls, a one-way delay under about 150 ms feels natural. Chats and live dashboards tolerate up to a second or more.

### Is polling good enough for real-time features?

Only for slow-changing data. Frequent polling wastes requests and still adds delay, while an open connection delivers updates at once.

## Related cards

- [WebSocket](https://wonderium.dev/web/websocket.md)
- [WebRTC](https://wonderium.dev/web/webrtc.md)
- [Server-Sent Events](https://wonderium.dev/web/server-sent-events.md)
- [Long Polling](https://wonderium.dev/web/long-polling.md)

---

- Level: [Web Platform](https://wonderium.dev/web.md)
- HTML version: https://wonderium.dev/web/real-time-communication
- Last updated: 2026-11-25
