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.
01Understand the problem
- 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
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
- Accept verified deletion requests from the account UI, support and the privacy team.
- Delete or irreversibly anonymise the user's personal data in every system that holds it, including warehouses and processors.
- Respect exceptions: legal holds, financial records with statutory retention, fraud and security records.
- Produce a per-request report: what was deleted where, what was retained and why.
Non-functional requirements
- 100 million users; ~0.1 % request deletion per month: 100,000 requests/month.
- Complete within 30 days for 99.9 % of requests; the account disabled and unreachable within 24 hours.
- Exactly-once in effect: retries are safe and nothing is half-deleted silently.
- The deletion system must not become a list of everyone who left: keep minimal identifiers.
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.