Build a chat application backend that can handle millions of simultaneous users without changing a single service to scale up.
Add a real-time live comment feed to a streaming video platform using goim's broadcast capability.
Send targeted push notifications to individual users or chat room subscribers at high throughput.
Integrate an external message source via Kafka so goim's job layer dispatches messages to the right clients.
Requires running three separate services plus a Kafka cluster for the job layer message queue.
goim is an instant messaging server written in Go, designed to handle a large number of simultaneous connected users. If you are building a chat app, a live comment feed, or any product where messages need to be pushed to many users at once, this provides the server infrastructure to do it. The server supports sending a message to a single user, to a list of users, or as a broadcast to everyone connected. Users can also subscribe to a shared key (similar to a chat room), and the server will forward messages to all subscribers of that key. The connection stays alive through heartbeat checks, which prevents the server from holding onto dead connections. Users must authenticate before they can subscribe, so anonymous connections are blocked. The architecture splits the work across three separate services that run independently. The comet layer manages the actual client connections over WebSocket, TCP, or HTTP long-polling. The logic layer handles the business rules for routing messages. The job layer receives messages from Kafka (a messaging queue) and dispatches them to the right comet nodes. This separation means you can run more instances of any layer to handle more load without changing the others. The README includes benchmark results from a test with one million connected clients. Running on a single server, the system delivered about 35.9 million received messages per second during broadcast testing, using around 14 GB of memory. That gives a rough sense of what kind of scale the server is built for. Client SDKs for Android and iOS are available in separate repositories linked from the README. A JavaScript WebSocket example is included in the main repository. The project is MIT licensed.
← terry-mao on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.