Aggregate event stream lifetimes
In an event-sourced system, there are two kinds of aggregates:
- Short-lived aggregates, which will not see many events in their short lifetime
- Long-lived aggregates, which will see many events over their very long lifetime
Examples of a short-lived aggregate would be Order
from the Ordering module and Basket
from the Shopping Baskets module. Both exist for a short amount of time, and we do not expect them to see many events. Examples of long-lived aggregates are Store
from the Store Management module and Customer
from the Customers module. These entities will be around for a long time and can end up seeing many events.
The performance of short-lived aggregates, and streams with few events in general, is not going to be a problem. The small number of events can be read and processed quickly. Larger streams would take longer to read and process; the larger it is, the longer it would take.