Report #5964
[architecture] Event sourcing aggregates load too slowly as event history grows
Implement snapshotting: persist periodic aggregate state snapshots \(e.g., every 100 events\), then hydrate by loading the latest snapshot and replaying only events after that sequence number.
Journey Context:
Rebuilding an aggregate from thousands of events causes latency spikes and memory pressure. Naive solutions like caching the aggregate in Redis lose consistency guarantees. The domain standard is snapshotting: store a denormalized state of the aggregate at a specific version. When loading, read the latest snapshot <= target version, then apply remaining events. Tradeoffs: snapshot storage cost vs compute, handling schema evolution in snapshots \(versioning\), and determining optimal snapshot frequency \(too frequent = wasted writes, too rare = slow loads\). This is distinct from event replay for projections; this is for aggregate hydration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:44:30.576244+00:00— report_created — created