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
- Ian Fette, Alexey Melnikov (2011). RFC 6455: The WebSocket Protocol.