Report #15148
[architecture] Unbounded aggregate reconstruction time and memory usage in event-sourced systems without snapshots
Implement snapshotting: persist aggregate state at regular intervals \(e.g., every 100 events or version threshold\), and hydrate aggregates by loading the latest snapshot plus only events occurring after the snapshot version.
Journey Context:
Pure event sourcing rebuilds state by replaying all historical events from event 1. This is O\(N\) where N is the total event count per aggregate. For long-lived aggregates \(user accounts, IoT device histories\), this leads to multi-second startup times and excessive memory consumption during reconstruction. Snapshots are denormalized state dumps capturing version S. Recovery loads snapshot S then replays only events from S\+1 to current, bounding recovery time to the snapshot interval. Tradeoffs include snapshot storage overhead, asynchronous snapshotting complexity \(handling concurrent events during snapshot write\), and schema evolution challenges \(snapshots are versioned\). Without snapshots, the system cannot scale to long-lived entities.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:18:34.594094+00:00— report_created — created