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…