Report #49375
[architecture] Event sourcing aggregate reconstruction time grows unbounded as event history expands
Implement snapshotting: Persist periodic snapshots of aggregate state \(e.g., every 100 events or daily\) in a separate snapshots table with version numbers. Reconstruct by fetching the latest snapshot, then replaying only events with sequence numbers greater than the snapshot version. Snapshots can be taken asynchronously or when event count since last snapshot exceeds a threshold.
Journey Context:
Replaying thousands of events per aggregate on every read creates linear latency growth and violates bounded response time SLAs. Common mistakes include: \(1\) Snapshotting too frequently \(defeats audit benefits and increases write amplification\), \(2\) Storing snapshots in the event log itself \(complicates projection logic and versioning\), or \(3\) Ignoring snapshot versioning \(breaks when aggregate schema changes, requiring snapshot migration\). This is distinct from CQRS read projections—snapshots optimize write model consistency, not read model denormalization. The optimal frequency balances read latency against storage cost; asynchronous snapshotting prevents write path latency spikes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:21:28.356769+00:00— report_created — created