Design a data deletion service

Design the service that honours erasure requests for 100 million users within 30 days: crypto-shredding with per-user keys, a fan-out that tracks every service and warehouse to a receipt, backups that cannot bring the deleted back, legal-hold exceptions, and a report you could hand to a regulator.

● Medium🔒 PROBy ·Design problem·14 min read·Intermediate → Advanced
data deletionright to erasureGDPR Article 17crypto-shreddingper-user encryption keysbackup deletion

01Understand the problem

✓What you will learn
  • Explain crypto-shredding with per-user keys and what it does and does not solve
  • Design a deletion fan-out across services and warehouses with receipts and escalation
  • Handle backups, logs and legal holds inside a 30-day SLA
  • Verify deletion and produce evidence for users and regulators
◎Interview radar

What they probe: how you know every place a user's data lives, how you delete from append-only systems and backups, what happens when one of 40 services ignores the request, and how you prove it was done. Where candidates slip: a single DELETE FROM users, forgetting the warehouse and logs, restoring a backup that brings users back, deleting records the law requires you to keep.

Under GDPR Article 17 (the right to erasure) a controller must erase personal data without undue delay when a valid request arrives, and Article 12 sets a response deadline of one month, extendable by two further months for complex cases. The UK GDPR and California's CCPA/CPRA have similar rights. The engineering problem is that one user's data is spread across dozens of services, a lake, caches, logs, search indexes, third-party processors and backups.

Functional requirements

  1. Accept verified deletion requests from the account UI, support and the privacy team.
  2. Delete or irreversibly anonymise the user's personal data in every system that holds it, including warehouses and processors.
  3. Respect exceptions: legal holds, financial records with statutory retention, fraud and security records.
  4. Produce a per-request report: what was deleted where, what was retained and why.

Non-functional requirements

  1. 100 million users; ~0.1 % request deletion per month: 100,000 requests/month.
  2. Complete within 30 days for 99.9 % of requests; the account disabled and unreachable within 24 hours.
  3. Exactly-once in effect: retries are safe and nothing is half-deleted silently.
  4. The deletion system must not become a list of everyone who left: keep minimal identifiers.
▭On the whiteboard · Scope3 points
01
FR
intake | delete everywhere | exceptions | report
02
NFR
100k requests/month | 30 days | idempotent | minimal records
03
out
access and portability requests (same data map, different action), consent management

This is an advanced module

Design problems: data security is part of the Pro pass. 4 more sections — the deep dives, the final design, follow-ups and the test — unlock with it.

Already a cyart.io or studio.cyart.io member? Your pass code is in your Studio account.