Menu

Engineering GDPR Right to Erasure in Event-Sourced Architectures: Crypto-Shredding vs Tombstones
📰

Engineering GDPR Right to Erasure in Event-Sourced Architectures: Crypto-Shredding vs Tombstones

DEV Community: database·Mogley1011·2 days ago
#XHL2U9J4
#devtodatabase#devto#dev#event#erasure
Reading 0:00
15s threshold

One of the most complex architectural conflicts in modern distributed backend systems is the collision between immutable data structures (Kafka event logs, event sourcing, append-only ledgers, blockchain) and Article 17 of the GDPR (The Right to Erasure) .

In a traditional relational database, fulfilling a Data Subject Access Request (DSAR) for erasure is conceptually trivial:

DELETE FROM users WHERE id = $1 ;

Enter fullscreen mode

Exit fullscreen mode

In an event-sourced architecture, deleting an event from an immutable segment breaks consumer offset tracking, invalidates cryptographic checksums, and violates the fundamental premise of append-only auditability.

Here is how modern production systems handle the erasure requirement without corrupting event streams.

The Naive Approach: Compaction and Tombstoning

Many teams start by relying on Kafka topic log compaction: emitting a tombstone record (a message with the user key and a null payload).

The failure modes of log compaction for GDPR…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.