This question evaluates a candidate's skills in system design, TCP-based protocol design, real-time messaging, data modeling, persistence, session/reconnection handling, and concurrency control for backend services.
Design a Discord-like chat server that accepts multiple clients over raw TCP (e.g., test via PuTTY/telnet).
Functional requirements:
/help
show available commands
/nick <name>
set/change nickname
/users
list users (at least in current room, or globally—state your choice)
/quit
disconnect
Non-functional requirements:
Explain your protocol, core data model, key components, and how you would handle concurrency, durability, and scaling.