Deletion and DSAR pipelines
Engineering the right to erasure and the right of access across microservices, warehouses, backups and logs: deletion events, crypto-shredding, DSAR automation, retention and proving it was done.
01What the law asks and where data hides
- Translate erasure and access rights into engineering requirements and deadlines
- Find every copy: services, caches, warehouses, backups, logs and processors
- Use crypto-shredding where physical deletion is impractical
- Design event-driven deletion propagation with acknowledgements
- Automate DSARs and keep proof of deletion without keeping the data
GDPR Article 17 gives people the right to erasure in defined circumstances (consent withdrawn, data no longer needed, unlawful processing, and others), with exceptions such as legal obligations to retain financial records. Article 15 gives the right of access: a copy of their data plus the purposes, recipients, retention and source. Article 12(3) sets the clock: respond within one month, extendable by two further months for complex or numerous requests. California's CCPA/CPRA gives 45 days, extendable once by another 45. These requests are usually called DSARs (data subject access requests) or more broadly DSRs.
| Where personal data hides | Why it is missed | Typical approach |
|---|---|---|
| Primary service databases | Rarely missed, but soft deletes leave rows in place | Hard delete or overwrite PII fields; purge soft-deleted rows on a schedule |
| Caches, search indexes, CDN | Rebuilt from source, so nobody owns them | Delete by key on the erasure event; short TTLs |
| Event streams (Kafka) | Retained for replay; immutable | Short retention, or compacted topics keyed by user with a tombstone |
| Data warehouse and lake | Append-only files, many derived tables | Partitioned deletes (Delta, Iceberg row-level delete) plus rewrite of derived tables |
| Logs and traces | Free text, high volume | Do not log PII; pseudonymous IDs; short retention |
| Backups and snapshots | Immutable by design | Crypto-shred, or "put beyond use" and expire on the backup rotation |
| Processors (email, CRM, support desk) | Outside your infrastructure | Call their deletion APIs; Article 19 requires telling recipients |
| ML training sets and features | Copied into experiments | Track lineage; drop from the next training run; consider machine unlearning only where required |
A design question like "implement account deletion across 40 microservices" is testing whether you avoid a synchronous fan-out of 40 HTTP calls. Expect to discuss an event with per-service acknowledgements, a deadline tracker, idempotency and what happens to backups.
This is an advanced module
Privacy engineering is part of the Pro pass. 3 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.
Related lessons
- Design a data deletion serviceHLD · Design problems: data securityPro
- Design a key rotation schedulerLLD · Problems: policy and crypto enginesPro
- Data protection: KMS, envelope encryption, tokenisationSecEng · Cloud & Platform SecurityPro
- Design a key management serviceHLD · Design problems: Infrastructure & dataPro