Design a real-time chat application like Slack or WhatsApp
Reported in Capgemini European engineering loops. Mid-to-senior design spanning WebSockets, message storage, and presence.
Interview scenario
Often asked in Capgemini loops at European offices (London, Berlin, Amsterdam, Paris, Stockholm, Dublin, and remote EU). Prepare a clear spoken answer plus key trade-offs.
Model answer
Try answering aloud first
Cover trade-offs, structure, and a concrete example before revealing the baseline response.
How to frame this at Capgemini: Connect your answer to measurable impact, clarity of thought, and trade-offs the team cares about. Below is a strong baseline response you can adapt with your own project examples.
Functional: 1:1 and group messaging, delivery/read receipts, online presence, message history, media attachments.
High level: Clients connect via WebSocket to chat servers; servers publish to message bus; persistence layer stores messages; push notifications for offline users.
Storage: Messages partitioned by conversation ID (time-series friendly—Cassandra, Scylla, or sharded SQL). Index by user inbox for recent threads. Object storage (S3) for media with CDN URLs in message payload.
Scale: Fan-out on write for small groups; fan-out on read for celebrity/large channels. Connection maps (user → server) in Redis for routing. CRDTs or sequence IDs for ordering.
Discuss end-to-end encryption trade-offs, idempotent send API, and sync protocol for mobile offline queues.
Discussion
Comments (0)
Share how this question came up in your loop, or add tips for others preparing.
Log in to comment on this question.