</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 1: One Button, Twelve Hundred Services - Problem Understanding & Clarifications

Executive Summary: The prompt sounds like a database chore. It is really a distributed coordination problem with a legal deadline and a burden of proof. We show four ways the obvious answer (delete the row, publish an event) fails, break the prompt down, run the clarification exchange, and meet Lena, whose account runs through all thirteen sections.

The interviewer reads it off a card:

"We're a company with about 4,000 internal services and two billion user accounts. Under GDPR, a user can ask us to delete everything we hold about them, or to give them a copy of it. Design the central service that takes that request and makes sure every one of those services actually does it, on time, and that we can prove it afterwards."

Lena lives in Berlin and has had her account for nine years. She re-authenticates with her password and a 2FA code and clicks Delete my account. Behind that one button are mail, photos, maps, video, a news app, ads, billing, a recommendations service orphaned by a reorg, the warehouse, backups, and an acquired fitness app. Her data sits in 197 services, and on the day she clicks, nobody can tell you which 197.

The Answer That Fits on a Napkin

Most candidates have this on the whiteboard within a minute:

DELETE FROM users WHERE user_id = 'u_7f3a9c';
-- then publish { "event": "user.deleted", "user_id": "u_7f3a9c" }

It isn't wrong, but it covers only a fraction of the problem:

  • Which services? The event reaches whoever subscribed. Of ~4,000 services, a partial registry lists 1,200 as holding personal data. Anything that never subscribed keeps its data, silently.
  • Did they do it? Fire-and-forget gets no reply. Under GDPR's accountability principle (Art. 5(2)), the company must be able to demonstrate compliance, and "we published an event" demonstrates nothing.
  • Where else does it live? Caches, search indexes, the data lake, logs, backups: none deletes by user_id.
  • Will it stay gone? Restore a backup, replay a topic, or let an offline phone sync, and the data comes back.

Key Insight: This is not a storage problem. It is a distributed coordination and proof problem with a legal deadline: get one instruction to every system that might hold a person's data, get a verifiable answer from each, finish within one month, and prove it later without keeping the data you deleted.

Quick check before moving on:

Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.