Unit 11 of 15 · about 4 hours · explain
Data classification, retention, residency and privacy-preserving analytics
Retention and residency are placement constraints on every store this track built. A log, index or backup that cannot say which jurisdictions hold it, for how long, cannot lawfully or safely hold user data.
You'll be able to
- Classify data into handling tiers with a retention and deletion mechanism per tier.
- Map each tier to the jurisdictions that may store and process it, with a transfer rule per border crossed.
- Choose a privacy mechanism that matches the question asked, and state what it cannot prove.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Residency and erasure: classification, topologies, crypto-shreddingHLD Handbook - Reliability, Operations and Security at Scale
Data classification as a distributed-systems problem; Residency topologies; Right-to-erasure and crypto-shredding; Cross-border transfers post-Schrems II; Audit, lineage, and consent
- DDIA 2e Chapter 14: privacy framingDDIA 2e - Chapters 2, 5 and 14
Chapter 14, Doing the Right Thing: Privacy and Tracking (pp. 589 to 596)
Read for the consent, retention and governance framing only. The chapter argues policy, not mechanisms; every mechanism claim in this unit comes from the HLD chapters and the Systems differential privacy unit.
- Privacy mechanisms: matching primitive to questionHLD Handbook - Reliability, Operations and Security at Scale
Differential privacy fundamentals; Federated learning and FedAvg; Choosing the right primitive
Read for the mechanism menu. The Systems unit on differential privacy: adjacency, sensitivity, noise and composition already derived that math; do not redo it, and implement nothing here.
Focus on
- Classification is a storage contract: each tier names its retention, its residency and the mechanism that deletes it. A tier without a deletion mechanism is indefinite retention.
- Crypto-shredding makes retained ciphertext unreadable only after every usable copy of the decryption keys is destroyed, including cached plaintext keys, key backups and alternate wraps. Plaintext and derived copies need their own erasure.
- Residency topologies place the constraint before the data moves. A backup or index copy in another jurisdiction is a transfer, whatever the primary store promises.
- Mechanisms answer different questions: noise for aggregate release, federation for training without centralizing data. Neither proves a model forgot its training set.
Common mistakes · 3
- Deleting the database row and keeping the backups, indexes and telemetry. Erasure must propagate to every copy the lineage records.
- Quoting a mechanism as a guarantee. Differential privacy bounds a query release; it says nothing about the raw store beside it.
- Treating consent text as residency control. Policies do not place bytes; topologies and transfer rules do.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.A tier keeps raw identifiers for 30 days with per-purpose keys, then destroys the keys while ciphertext remains in cold backup. Is that erasure?Answer
Only if every usable copy of those keys is gone, including cached plaintext keys, key backups and alternate wraps, and no plaintext or derived copy survives elsewhere. Ciphertext left in backup does not defeat shredding, and shredding alone does not establish legal compliance.
2.A replica of the primary store runs in a second jurisdiction. What must the residency mapping add?Answer
The replica's jurisdiction, the transfer rule covering the border crossed, and matching retention and deletion for the copy. The copy is a transfer even though the application never asked for one.
3.Why does this unit implement no privacy mechanism?Answer
Its job is selection and placement: which tier, which jurisdiction, which mechanism. The Systems units already derived the noise math and demonstrated the attacks; repeating them here teaches nothing new.
You're done when
Your four-tier table names a verifiable deletion mechanism per tier, every cross-border copy has a transfer rule, and you can say which privacy question each mechanism answers.
Only when you can do this without notes.
Leads to
Notes
Resources · 2 for this unit, 15 more in the section
- HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary
Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.
- DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support
Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.
Also in this section
- Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required
Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.
- Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support
Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.
- Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support
Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.
- Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support
Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.
- Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support
Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.
- The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support
Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.
- Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional
Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- SPIFFE Workload Identity and Workload APISPIFFE Project · support
Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (
FetchX509SVID,FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap. - OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support
Read signals and context propagation (W3C Trace Context
traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps. - Replicated Log and Stream Processor - Production ContractRoadmap-Final · support
Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.
- OWASP Threat Modeling Cheat SheetOWASP · reference
Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.
- Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support
Read Point-in-time joins (entity dataframes,
get_historical_features, TTL backward scan,filter_by_created_timestamp) and Feature retrieval (event_timestampas the inclusive upper bound,get_online_featureswithout timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation). - MLflow Model Registry DocsMLflow · support
Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.
- DVC Docs - Data VersioningDVC · support
Read
dvc add(Description and Example: Single file) for.dvccontent-hash sidecars, thedvc.yamlpage with itsdvc.lock filesection for pipeline state, andpushandpullfor transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15. - PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference
Read Section 19.5.6 Recovery Target, the
pg_verifybackupreference and thepg_rewindreference for recovery stopping points, manifest checks and rejoining a diverged primary.