Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Practice build · Networks and protocols

Build your own Chat Server

A multi-room chat server, first over raw TCP and then over WebSockets, that serves hundreds of concurrent clients.

  • Intermediate
  • About 8–16 h
  • 5 checkpoints
  • 4 tutorials · C, C#, Ruby

Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.

Choose a tutorial

Why build it

Chat is the standard example of a real-time system: long-lived connections, fan-out, presence and message ordering. It is also the system behind the classic chat design interview question.

You will be able to

  • Serve many long-lived connections with an event loop or async I/O.
  • Broadcast to rooms without letting one slow client delay the others.
  • Upgrade an HTTP connection to WebSocket and frame messages.
  • Reason about delivery, ordering and message history.

Skills it exercises

Recommended on Backend Engineer, System Design and Network Engineer.

Checkpoints

How you know you are there

Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.

  1. Checkpoint 1Self-check

    TCP chat

    Done when: Several nc clients connect, choose a nickname and see each other's messages.

  2. Checkpoint 2Self-check

    Rooms and commands

    Done when: /join, /leave and /who work, and a disconnecting client is announced and cleaned up.

  3. Checkpoint 3Self-check

    Slow clients

    Done when: A client that stops reading does not delay messages to others; its buffer is capped and it is disconnected when the cap is reached.

  4. Checkpoint 4Self-check

    WebSocket

    Done when: A browser page connects over WebSocket and chats with the TCP clients.

  5. Checkpoint 5Self-check

    History

    Done when: After a server restart, a new member of a room receives its last 50 messages in order.

Stretch goals

  • Run two server instances connected through a pub/sub broker.
  • Load-test with 1,000 simulated clients and report latency.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: C, C#, Ruby, Rust). They open on the author’s site.

Where to go next

Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.

Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.