← Grammarly Interview Insights

Grammarly·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Grammarly system design round, one big question about a disappearing-message broadcast system. The problem sounded deceptively simple and I underestimated how deep the interviewer wanted to go on the storage and consistency side.

Questions Asked (1)

Q1

Design a chat system where a sender can broadcast the same message to multiple recipients privately (each recipient sees a separate 1:1 thread), messages can only be read once and are then permanently deleted, and the sender gets per-recipient delivery and read status.

System DesignData ModelingTechnical Trade-offs
Author's notes

I went straight for a shared message row with per-recipient state records, which felt right, but the interviewer kept poking at what happens if a delete fails partway through.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a high-level architecture that decouples message fan-out from delivery. Focus on the core challenges: per-recipient private threads, read-once semantics with permanent deletion, and per-recipient status tracking. Discuss data modeling, storage choices, and trade-offs for reliability and privacy.

Pro tip: Emphasize idempotency and exactly-once delivery for read receipts, and propose a tombstone mechanism to prevent message resurrection after deletion. Also, consider using a separate service for fan-out to handle high broadcast volumes.

1. Clarify Requirements and Scale

Ask about expected user base, message volume, latency requirements, and whether read-once is strictly enforced. Clarify if recipients can be offline and if delivery status includes sent, delivered, and read.

2. High-Level Architecture

Propose a client-server model with a message service, a fan-out service, and a storage layer. Use a message queue for asynchronous delivery and a database for per-recipient message copies and status.

3. Data Modeling for Private Threads and Read-Once

Design a schema where each message is stored per recipient with a unique ID, and a 'read' flag that triggers deletion. Use a separate table for status tracking and consider encryption for privacy.

4. Read-Once and Deletion Mechanism

Implement a two-phase read: mark as read and then delete after client acknowledgment. Use a tombstone to prevent re-delivery and ensure deletion is atomic and irreversible.

5. Delivery and Read Status Tracking

Use a status table with states (sent, delivered, read) and update via client acknowledgments. Ensure idempotent updates and handle offline recipients with retries and expiration.

Key Points to Mention

  • Fan-out on write vs. fan-out on read: choose fan-out on write for private threads to simplify per-recipient status.
  • Storage: use a distributed database like Cassandra or DynamoDB for scalability and per-recipient message copies.
  • Read-once semantics: implement with a read receipt that triggers deletion, and use a tombstone to prevent re-delivery.
  • Status tracking: maintain a separate table with message ID, recipient ID, and status; use idempotent updates.
  • Privacy: encrypt messages at rest and in transit, and ensure deletion is permanent (e.g., overwrite or crypto-shredding).
  • Trade-offs: consistency vs. availability, latency vs. durability, and cost of storing multiple copies.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.