All insights Claudio Torrens · Architecture field notes
Back to all insights
Design Data Deletion Before Data Starts to Replicate
Software Architecture November 30, 2026 Claudio Torrens

Design Data Deletion Before Data Starts to Replicate

Deleting one database row is easy. Proving that a business record has been removed from a distributed system is an architecture problem.

Data deletion becomes difficult when records spread into caches, search indexes, analytics stores, event streams, backups, and external services. Treat deletion as a designed lifecycle with explicit ownership, propagation, evidence, and recovery rules.

Software ArchitectureData ArchitecturePrivacy EngineeringDistributed SystemsData LifecycleGovernance

Most systems make data easy to create and difficult to remove. A customer record may begin in one application, then spread into a cache, a search index, an analytics platform, a document store, an event stream, a backup, and several external services. By the time someone asks for it to be deleted, there may be no single operation that represents the truth.

The usual response is a script, a support ticket, or a cascade of database deletes. That can remove visible records while leaving derived copies, replayable events, orphaned files, or downstream replicas untouched. It can also remove too much and damage financial, operational, or security evidence that must follow a different lifecycle.

My view is that deletion is not a database feature. It is a distributed business workflow. The architecture must define what deletion means, which system has authority to request it, how the instruction propagates, what must be retained or transformed, and how completion is proven.

Start by defining the business meaning of deletion

“Delete the customer” sounds precise until the team examines the data. Does it mean removing an account, erasing personal attributes, ending a commercial relationship, revoking access, suppressing future contact, or making a record unavailable to normal users? Those outcomes are related, but they are not interchangeable.

A destructive technical command should never be asked to resolve an ambiguous business decision. Before choosing a mechanism, classify the intended outcome. Common outcomes include:

  • Erase: remove data that no longer has a valid purpose.
  • Anonymize: irreversibly remove the ability to associate retained data with a person or entity.
  • Restrict: preserve data under tightly limited access because another obligation still applies.
  • Expire: remove data automatically after a defined period or business event.
  • Detach: break a relationship while preserving an independent transaction or operational record.

Legal, privacy, security, finance, and product owners may all influence the correct outcome. Architecture should not invent that policy, but it must make the policy executable. A retention statement in a document is not operational until systems can identify the affected data and apply the required transition consistently.

Map propagation, not just storage

A conventional data inventory lists databases and tables. Deletion requires a propagation map: where the data originates, which identifiers connect its copies, what transformations occur, and which destinations can recreate it later.

Start with a representative business object and trace its journey. Include synchronous APIs, asynchronous messages, exports, logs, object storage, machine-learning features, reports, support tools, and vendor integrations. For each destination, record whether the data is authoritative, replicated, derived, aggregated, or merely transient.

This map often reveals the real risk. A search index may be rebuilt from the primary database and therefore needs a reliable tombstone rather than an isolated manual delete. An analytics table may contain derived attributes with no link back to the original identity. An external service may accept deletion requests but provide no usable completion evidence. A historical event may be immutable by design yet still contain fields that should never have been placed in the event.

The objective is not to force every store into one retention model. It is to understand which copies share a lifecycle and which have a legitimate, separately governed purpose.

Give deletion a control record

In a distributed system, a request can partially succeed. If deletion is represented only by the absence of a row, the system cannot distinguish “successfully removed” from “never existed,” “not processed,” or “temporarily unavailable.” Absence is a weak coordination signal.

Create a durable control record for each deletion workflow. It should identify the business subject, the authorized request, the applicable policy, the systems in scope, the current status, and the evidence returned by each participant. This record should contain only the minimum information needed to coordinate the process; turning it into another rich copy of the deleted data defeats its purpose.

A practical state model might include requested, validated, in progress, partially completed, completed, rejected, and needs review. The exact labels matter less than making partial completion visible. A workflow that reports success after deleting from the primary database while three downstream systems are unavailable is not complete.

Use identifiers that survive the removal

Deletion frequently breaks the lookup path needed to find remaining copies. If the primary profile disappears first, downstream records keyed by an internal identifier, email hash, or vendor reference may become unreachable. Design a deletion key strategy before removing the authoritative record.

The strategy should minimize sensitive content, support idempotent retries, and avoid creating a permanent correlation database. In some designs, a short-lived encrypted manifest is appropriate. In others, each participant can receive a scoped command while the original identity still exists and return an opaque receipt.

Propagate intent, not implementation

A central service should not need to know every table that another system owns. Send a business-level deletion command that states the subject, policy, scope, and request identifier. Each participating system remains responsible for applying that intent to its own stores and derived data.

This preserves ownership while allowing central coordination. It also prevents a deletion orchestrator from becoming a privileged cross-system database tool. Participants should process repeated commands safely, report a stable outcome, and retain only the evidence required to demonstrate completion.

New consumers must join the lifecycle explicitly. A design review for a new data sink should answer four questions:

  1. Which data will it copy or derive?
  2. Which retention and deletion policy applies?
  3. How will it receive and process deletion intent?
  4. What evidence will it return, and who owns failures?

If these answers are deferred, the integration creates deletion debt on its first day.

Handle events, backups, and derived data honestly

Some stores cannot or should not be edited record by record. Append-only event logs and backups exist partly because they resist mutation. Pretending they behave like operational tables produces fragile promises.

For event-driven systems, minimize sensitive fields in events, separate identity from durable business facts, and use references that can be rendered unusable when appropriate. Encryption with governed key destruction can help in selected designs, but it adds key-management and recovery tradeoffs and should not be treated as a universal shortcut.

Backups need a restoration rule. A deleted record may reappear if an older backup is restored without replaying subsequent deletion instructions. The recovery plan should therefore preserve a deletion ledger or equivalent control stream long enough to reapply valid deletions after restoration, while still limiting what that ledger reveals.

Derived and aggregated data requires a policy decision. Some outputs may no longer identify the original subject and can follow a separate lifecycle. Others can still be linked or reconstructed and remain in scope. The architecture needs a testable classification, not the assumption that “analytics” automatically means anonymous.

Measure completion and failure

A deletion capability is only trustworthy when its operating state is visible. Track workflow age, completion time, systems with repeated failures, requests awaiting policy review, and restorations that required deletion replay. Alert on stalled workflows before they become forgotten tickets.

Test the path with the same discipline as payment or order processing. Verify idempotency, unavailable participants, duplicate requests, late-arriving events, backup restoration, new downstream consumers, and authorization failures. Also test that retained evidence does not recreate the data the workflow was designed to remove.

Conclusion

Data deletion becomes expensive when architecture treats replication as permanent but deletion as exceptional. The better approach is to design both directions of the lifecycle at the same time.

Define the business meaning, map propagation, coordinate deletion with a durable but minimal control record, make every data consumer participate, and prove completion across partial failure. When deletion is a first-class architecture capability, the organization can change or retire data deliberately instead of searching for copies after the fact.

Explore more insights

Browse more architecture, cloud, AI, and strategy articles.

Explore all insights

Recent posts

View all

Comments

Join the conversation Sign in with LinkedIn
No comments yet. Be the first to share your thoughts!