Report #4128
[architecture] Excessive latency when loading large event-sourced aggregates with thousands of events
Implement snapshots as ephemeral, versioned caches: store aggregate state serialized with the sequence number of the last event processed. On load, fetch the latest snapshot and only replay events after that version. Treat snapshots as disposable \(rebuildable from events\) and never embed business logic in snapshot creation that isn't reproducible from the event stream.
Journey Context:
Novices often snapshot too frequently \(causing write amplification\) or use snapshots as the source of truth \(risking data loss if corruption goes undetected\). A critical error is snapshotting in-memory state without tracking the exact event version, leading to 'lost events' if the snapshot is written but subsequent events fail to persist. The correct approach uses the event store's expected version concurrency check when writing snapshots, ensuring idempotency. Snapshots should be stored in a separate collection to avoid locking the event stream during heavy read loads.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:51:27.626731+00:00— report_created — created