In traditional databases, you store the current state of the world. If Alice deposits $100, you run UPDATE accounts SET balance = 100. The old value of the balance is overwritten and lost forever.
Event Sourcing turns this upside down. You do not store the state. You only store an immutable, append-only log of events that happened. The current state is simply derived by replaying the events.
Use the slider at the bottom to "time travel" through the immutable event log. Watch how the current balance is calculated dynamically by replaying the active events.
Event Sourcing offers incredible benefits for complex systems:
But Event Sourcing creates a huge volume of data. How do we process millions of events efficiently? We use Stream Processing systems like Apache Kafka.