Discord·Software Engineer·Technical Phone Screen
Jul 2026
Phone screen for a Software Engineer role at Discord, focused entirely on building an async TCP chat server in Python from scratch. Two-part problem: a global room first, then rooms with command parsing. The concurrency angle was the whole point.
- Build a TCP chat server using Python's asyncio that handles up to ~1000 concurrent clients over a line-based text protocol, starting with a single global room where all clients share one broadcast space.
- Extend the chat server to support named rooms and slash commands: /join to switch rooms, /who to list room members, and /quit to disconnect cleanly.
- How would you scale this chat server horizontally so users in the same room across different server processes can still see each other's messages?
- How would you handle a slow or stuck client whose socket buffer is full without blocking message delivery for everyone else?
- How would you implement graceful server shutdown so in-flight writes finish and connected clients get notified before the process exits?
- What strategies would you use to bound memory usage and prevent abuse, such as from very long lines, too many rooms, or high message rates?
“The hardest part wasn't the code, it was knowing what to ask before writing anything.” The rest of the author's notes on Software Engineer interview at Discord, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post