Design a GDPR or CCPA Compliance Pipeline

Hard45 min
1 / 30
System design answer

Design a GDPR or CCPA Compliance Pipeline

Hard45 min30 sections
understanding•10 min read

Problem Statement: Compliance as a Distributed Systems Problem

Frames GDPR/CCPA compliance as a fleet-wide data execution problem, not a legal checkbox.

Problem statement

Design a privacy compliance pipeline that tracks every place personal data lives, and executes data subject requests (DSRs) — access, export, rectification, restriction, and erasure — across hundreds of microservices, databases, warehouses, caches, backups, and third-party processors, with a hard legal deadline and a complete audit trail.

GDPR Article 17 (right to erasure) and Article 15/20 (access and portability), and CCPA/CPRA's right to delete and right to know, turn a legal obligation into a distributed systems problem. When a user says "delete my data," the system must find that user's data in every store it can reach — primary databases, read replicas, search indexes, analytics warehouses, ML training sets, logs, message queues, CDN caches, backup snapshots, and downstream SaaS processors — and provably remove or export it, typically within one calendar month under GDPR and 45 days under CCPA.

Why this is hard

A normal delete is a single write. A compliance deletion is a fan-out saga across N heterogeneous systems, each with different APIs, different consistency models, different retention rules, and different legal bases. The failure modes are asymmetric: missing one replica means the company is non-compliant even if 99 systems succeeded. The system must therefore be complete by construction: it derives the set of stores from data lineage and identity mapping, not from a hand-maintained checklist.

The three planes

  1. Knowledge plane: data catalog + lineage graph + PII classification. Answers "where does personal data live, and which identifiers link it to a subject?"
  2. Execution plane: request intake, identity verification, orchestration saga, per-system adapters for delete/export/restrict, verification, and compensation.
  3. Governance plane: tamper-evident audit trail, retention and legal holds, policy engine (which regulation applies to which subject), exception handling (fraud, tax, litigation holds), and regulatory reporting.

Legal deadlines drive the architecture

GDPR requires response without undue delay and within one month (extendable by two months for complex requests). CCPA requires acknowledgment within 10 business days and response within 45 calendar days (extendable once by 45). These are not product SLOs; they are legal ceilings. The architecture targets far tighter internal deadlines — 72 hours for automated erasure completion — so that exceptions, verifications, and manual reviews can consume the remaining budget without breaching the law.

A strong answer separates request correctness (did we verify the right person and the right regulation?) from execution completeness (did every store act?) from proof (can we show a regulator what happened, when, and by what authority?).

Key Highlights

  • •A DSR is a fan-out saga across hundreds of heterogeneous stores, not a single DELETE statement.
  • •Completeness comes from lineage-derived store sets, never from hand-maintained checklists.
  • •GDPR: 1 month statutory; CCPA: 45 days; internal target 72 hours automated completion.
  • •Three planes: knowledge (catalog/lineage), execution (orchestration/adapters), governance (audit/policy).
  • •Missing one replica is non-compliance; the system must be complete by construction.
Lead With Completeness
Open by saying the hard problem is not deleting a row — it is proving you deleted every row in every system, including replicas, backups, and downstream processors. That instantly separates a privacy engineer from a CRUD engineer.
Do Not Draw a Single DELETE
A design where one service issues one delete ignores replicas, warehouse copies, ML features, logs, backups, and SaaS processors. It fails the interview and the audit.

Section Rescue Kit

Buzzwords to use:

Right to ErasureComplete by Construction

Safe statements:

  • "Let me separate the three planes first, because each has different consistency and latency needs."
  • "Before choosing technology, let me define what 'done' legally means for delete and export."
Design a GDPR or CCPA Compliance Pipeline - System Design | WinJob | WinJob