Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Durable Disposable Email Service

Design an anonymous disposable-mail product at 100-million-user scale whose addresses last 10 minutes by default or five hours if chosen, while guaranteeing human-looking address uniqueness and permanent non-reuse.

Problem statement

For this exercise, assume an anonymous user requests a human-looking disposable email address that can send and receive mail for a lifetime fixed at allocation: 10 minutes by default, or five hours if the user selects the longer option. The lifetime cannot be extended or changed afterward.

The service creates no user account and stores no name, phone number, or persistent personal profile; the mailbox capability issued at allocation is the only credential, so abuse controls must work without a stored user identity.

During that lifetime, the user reads received messages and submits outbound messages through a capability-scoped mailbox session; received messages are readable only until the address expires, and the session and send authority end at that same instant.

The address namespace is permanent: once an address has ever been issued, it must never be assigned to another user, even after the mailbox expires.

Design address generation and claiming, the used-name check, inbound routing, authenticated outbound submission, mailbox storage and retrieval, expiry, abuse controls, and recovery.

Explain how you determine whether an address was ever used at this scale and evaluate the correctness and operational limits of any probabilistic membership structure you propose. Contacts, folders, and a full consumer email suite are out of scope.

As a post-expiry follow-up, define whether message bodies, metadata, or neither are archived; choose retention, access, deletion, and recovery rules without restoring ordinary mailbox access after the address expires.

The human-looking naming goal includes avoiding obviously synthetic or abusive local parts that may contribute to spam-filter flags. Discuss naming syntax, readability and namespace capacity separately from outbound-domain reputation and delivery policy; a realistic username cannot guarantee inbox acceptance.

What to build

  1. Allocate a human-looking address exactly once for a request that names its lifetime option (10 minutes by default, or five hours). An identical retried request returns the same address and expiry, and reusing its idempotency key with a different lifetime option is rejected as a conflict. State a human-looking naming policy while preserving adequate usable namespace and exact claims; do not promise that username appearance bypasses spam filters.
  2. Accept inbound email only for an active issued mailbox and let its capability holder list and read those messages until the address expires, without exposing another mailbox.
  3. Submit outbound email from an active issued address with authenticated, idempotent, abuse-controlled delivery.
  4. Preserve an exact permanent record of every issued normalized address after message content or sessions expire.
  5. Deny ordinary mailbox access at that address's expiry, then apply an explicit post-expiry archival or deletion policy with separate retention and authorization controls.

At scale

  • For this exercise, support 100 million monthly active users and issue up to 20 million new addresses per day; plan for up to 5 million concurrently live mailbox sessions, the bound when most addresses use the five-hour option (20 million per day × 5 hours ≈ 4.2 million).
  • For this exercise, accept 500,000 inbound and 100,000 outbound messages per second at peak; expose an accepted inbound message within 10 seconds at p95.
  • For this exercise, each address's lifetime is chosen at allocation: 10 minutes by default, or five hours for the longer option. Ordinary address, session, and mailbox access, including access to every received message, ends when that lifetime expires. The exact issued-address registry is retained indefinitely; any retained message archive is a separately authorized lifecycle chosen and justified by the candidate.
  • For this exercise, one generated-name campaign may drive 50,000 concurrent allocation attempts; exactly one claimant may win any normalized address.