Try
↑ ↓ move↵ openesc close

Interview prep / Chat system

Junior · Chat system · System design interview question

What is a gateway server in a chat system?

Sketch your own answer first, then compare it with the one below.

A strong answer

A server that holds many long-lived client connections and forwards messages between them and the services behind it. It does little work per message, so one machine can hold a very large number of idle connections.

Keeping it thin lets you scale connection count separately from business logic. It holds state, which is who is connected, so a crash drops its users.

Sources

Learn it by running it

The design a chat system lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms