Interview concept

What are WebSockets?

WebSockets provide a persistent, full-duplex connection over a single TCP link, letting the server push data to the client without repeated requests. They power chat, live dashboards, multiplayer, and collaborative editing.

Interview concept

How it works

Full-duplex

After an HTTP upgrade handshake, both sides can send messages at any time over one connection.

Versus polling

They avoid the overhead of repeated polling and the one-way limits of server-sent events.

Scaling

Many open connections need connection-aware balancing and a pub-sub layer to fan out messages across servers.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

When should I use WebSockets over polling?

When you need low-latency, two-way, real-time updates such as chat, live feeds, or collaborative editing.

How do WebSockets scale?

Through connection-aware load balancing and a pub-sub backbone that broadcasts messages to the right servers.