Wei-Jen demonstrated solid system design capabilities and clear communication during our mock interview. The session focused on designing Slack-like chat infrastructure, and Wei-Jen approached the problem methodically with strong fundamentals.
Areas of strength included:
- Quickly identified the core functional requirements and verified assumptions with the interviewer.
- Gave reasonable scale estimations and provided non-functional requirements with numerical SLOs.
- Managed time effectively: ~5 minutes for requirements and completed high-level design in ~20 minutes.
- Presented a step-by-step logical flow from ground-up architecture, including clear API design.
- Demonstrated thoughtful protocol selection and reasoning around communication mechanisms.
- Accurately expanded core database entities: message, chat, user, device_session, participants, etc.
- Included a media server interaction flow, and detailed how blob storage responses would be handled.
- Considered offline user handling: using a notification service, an inbox table, retention policies, and clean-up via cron jobs.
- Delivered a well-written and visually clear workflow diagram—an enjoyable walkthrough.
- Proposed a tombstone deletion strategy with nuanced handling for offline recipients.
- Introduced message queues to absorb burst traffic and preserve message ordering.
- Applied Redis caching to map session → websocket servers, and accounted for TTL to handle client hops.
- Thoughtfully discussed Push vs Pull models for unsent message retrieval.
Areas for improvement:
- During time-constrained interviews, consider voicing over non-critical APIs after the first one to save time.
- When discussing message ordering, emphasize how message IDs or consumer offsets ensure ordering even under disorder.
- For hot topic channels, avoid duplicate messages with different IDs; instead, maintain a canonical structure: a single table with participants, message_id, timestamp, and chat_id for simplicity and consistency.