Concepts

What Is an Event Store?

How Event Store Databases Work

Talk to an event store expert ↗

What is an event store and why do we want it?

An event store works like a full bank statement, where a traditional database is just the balance. The balance tells you where you stand today, while the statement shows every transaction that got you there. With an event store, that history is what you hand auditors and regulators when a decision needs explaining. And because nothing in an event store is ever overwritten, your teams can still answer questions years later that nobody thought to ask at launch.

A TRADITIONAL DATABASE
The balance

One number, replaced every time something changes.

CURRENT BALANCE€2,000starting point
Where you stand today.
AN EVENT STORE
The full statement

Every transaction is added as a new line, and nothing is ever written over.

Mar 02Salary+ €3,200
Mar 04Rent− €1,250
Mar 09Groceries− €84
Mar 15Refund from airline+ €420
Mar 21Card payment, hotel− €1,946
How you got there, line by line.
The auditor asks, “Why did the balance drop in March?”

What does an event store give you?

Most systems remember only the latest version of every customer, order and account. When a customer disputes a charge, a regulator asks why an application was declined, or a product team wants to know why sign-ups dropped last spring, someone has to rebuild the answer from logs, backups and memory. With an event store the answer is already there, because every change was recorded as it happened.

Decisions you can explain. Every outcome traces back to the facts that produced it, in the order they happened, so an explanation takes minutes instead of an investigation.

Answers without a new project. New questions are answered from history you already keep, instead of waiting for engineering to build another report or data pipeline.

Mistakes stopped at the source. Rules such as never charging a customer twice or never selling the last seat to two people are checked the moment a change is made, not cleaned up afterwards.

01 · EXPLAINDecisions you can explain
Loan application declined
Application receivedJan 12
Income details updatedJan 14
Credit check returnedJan 15
Lending limit reachedJan 15
02 · DISCOVERAnswers without a new project
Which promotion brought customers back?
Spring sale
Free shipping
Loyalty points
03 · PROTECTMistakes stopped at the source
Pay invoice #2041, €120Sending…
Pay invoice #2041, €120Sending again…
A customer clicks pay twice.

What does that look like in practice?

A disputed payment

A customer says they were charged twice. Instead of reconciling records across several systems, the support team reads the account’s history and sees exactly which requests arrived, when, and why only one of them was accepted. The dispute is closed the same day, with evidence.

A claim under appeal

A claim was declined three years ago and the customer appeals. The team can show what the policy, the customer’s details and the rules looked like on the day of the decision, not just what they look like today.

A question nobody planned for

Marketing wants to know which promotions actually brought customers back. Because purchases were never overwritten, the analysis covers every year of history, not just the months since someone thought to start tracking it.

A course with one seat left

Two students try to enrol in a course with a single remaining place at the same moment. One enrolment is accepted, the other student is told the course is full and offered another. Nobody is overbooked, and nobody has to fix it by hand later.

BANKINGA disputed payment
09:14:02 · Card payment, €58arriving
09:14:03 · Same payment again
Dispute closed the same daywith evidence
The account’s history shows exactly which request arrived, when, and why only one went through.
INSURANCEA claim under appeal
20232024Today
Decision day
The policy, the customer’s details and the rules as they were on that day.
Show what everything looked like on the day of the decision, not just today.
RETAILA question nobody planned for
2021
2022
2023
2024
2025
Purchases were never overwritten, so the answer covers every year, not just recent months.
EDUCATIONA course with one seat left
TAKEN
A
B
A gets the seat. B is told the course is full and offered another.
Two people, one place, the same moment. Nobody is overbooked and nothing needs fixing by hand.

Don’t we already have something like this?

Probably, in part. You most likely keep some history already, such as audit tables, application logs, a data warehouse or a stream of messages passed between systems. Each one records some of what happened, but none of them is the record your systems actually run on.

That difference shows up when it matters. Audit tables are added after the fact and miss whatever nobody thought to log. Logs are kept for weeks, not years. Warehouses hold copies that are often a day behind and can disagree with the live system. Message streams move information between systems, but they are not built to be the record of what happened.

Teams can build a full event store on top of a general-purpose database, and some do. It works, but it becomes a long-running project of its own that needs specialist engineers to build and look after, and that time comes out of the products customers pay for.

What you probably have
Every change, for years?
Is it the live record?
Stops a mistake as it happens?
Audit tableadded for compliance
~Only what someone chose to log
✕A copy kept on the side
✕Records mistakes after they happen
Application logskept by every system
✕Usually weeks, not years
✕Written for debugging
✕Read after the fact
Data warehousefor reports and analysis
~Copies, often a day behind
✕Can disagree with the live system
✕Too late to stop anything
Message streammoves updates between systems
~Kept for a set period
✕Passes information along
✕Accepts whatever is sent
Event storethe record your systems run on
✓Every change, kept for good
✓It is the live record
✓Checked as each change is made
Each of these records part of the story. Only an event store is the record your systems actually run on.

How does an event store help with audits, compliance and AI?

In regulated industries you are asked to show not only what you decided, but why, and on what information. An event store keeps that record by design, in order and unchanged, so the evidence for a decision is the same data your systems ran on rather than a separate audit log that can drift from it.

The same holds for automated decisions. When a rule engine or an AI agent approves, rejects or recommends something, the event store keeps the facts it acted on. That makes automated decisions explainable after the fact, which is increasingly what customers, auditors and regulators expect.

AN AUDIT“Why was this claim approved?”
Claim filed with photosFeb 03
Inspection report attachedFeb 06
Policy covered water damageFeb 06
Approved within the claim limitFeb 07
✓ The evidence is the data your systems ran on
AN AI AGENT“Refund of €240 approved.”
Order delivered five days lateMar 11
Customer for four yearssince 2022
Refund policy allows up to €300current
Refund sent to the original cardMar 12
✓ Explainable after the fact, step by step

What does it cost, and what does it save?

Keeping every change sounds expensive. In practice the larger cost is usually what teams spend working around missing history, such as audit trails added after the fact, a new data pipeline for every new report, and incidents investigated without a record of what actually happened.

Older history can move to cheaper storage while staying available for audits and new questions. And because the history is kept in one place, there are fewer systems to buy, run, secure and staff.

WITHOUT THE HISTORYThe cost of working around it
Audit trail added after the factONGOING
A new data pipeline for every reportONGOING
Incidents investigated without a recordONGOING
Reconciliation between systemsONGOING
Old backups kept just in caseONGOING
EFFORT
WITH AN EVENT STOREHistory kept once, in one place
Every change, for every customer, kept by design
RECENT YEARSFAST STORAGE
202120222023202420252026
OLDER YEARSCHEAPER STORAGE
Still available for audits and new questions, at a lower cost.

Why Axon Server?

Axon Server is Axoniq’s event store and message router in one system. Teams get the full history, the checks that keep it correct, and high availability built in, instead of assembling and maintaining those pieces around a general-purpose database.

That means less infrastructure to own and more engineering time spent on the products your customers pay for. With Axoniq Insights, analysts and product teams can also query that history directly, in plain language or SQL, without waiting for engineering to build a new report.

ASSEMBLED AROUND A DATABASE
Databasekeeps the latest state
Audit logadded for compliance
Message queuemoves updates around
Report pipelineone per new question
Backup toolingand recovery scripts
Failover setupfor when a server dies
0systems to buy, run, secure and staff
Axon Server
The full history, kept by design
Checks that keep it correct
Stays up when a server fails
Gets each request to the right place
Less infrastructure to own, and more engineering time for the products customers pay for.

What is an event store?

An event store is a database that keeps every change in your application as an immutable, ordered event, retrieves one entity’s history efficiently even at billions of events, and validates every new event against that history before accepting it.

Any database can accumulate records, and none of them becomes an event store by doing so. The name is earned by the two operations that must hold under production load. Retrieval has to isolate one entity’s ordered history from billions of records during reads at latencies a live application can tolerate, and every append must be validated against the existing history at write time.

THE SHAPEAppend, never overwrite

Each change goes after the last one. Recorded events never change.

1StudentRegisteredIMMUTABLE
2CourseCreatedIMMUTABLE
3CourseSubscribed
4AddressChanged
5CourseSubscribed
01 · RETRIEVEOne entity, out of billions

One entity’s ordered history, isolated from billions of records.

student:s-10 of 2,400,000 read
02 · VALIDATECheck before accepting

Every append is validated against the existing history at write time.

#read: 29 of 30 seats takenMARKER @118
120CourseSubscribed s-12MATCHES
decide: one seat left, subscribe s-41
Any database can accumulate records. Two operations earn the name event store, and both must hold under production load.

What is an event?

An event is a record of something significant that happened in your system, written in past tense, e.g. RegistrationConfirmed or PaymentRejected. These are facts and are never changed afterwards: what happened, happened. When circumstances change, a new fact is appended after the old one rather than written over it.

That append-only shape, rather than a mutable table, is what separates an event from a database entry. A typical row in a relational database describes how things currently are, while an event describes what occurred, and a system built on events keeps every occurrence in order for as long as the history matters.

TYPE
CourseSubscribed
POSITION
1,048,577
TIMESTAMP
2026-11-05T09:14:22.318Z
TAGS
student:s-1course:c-9
PAYLOAD
{ "studentId": "s-1", "courseId": "c-9", "semester": "2027-spring" }
TYPEWhat happened, in the past tense

Named for the business fact, not the technical change. Handlers and queries select on it.

HISTORY OF student:s-1
StudentRegisteredcity: Amsterdam
CourseSubscribedcourse: c-9
CourseSubscribedcourse: c-4

How is an event store different from a database?

A traditional database stores the answer, while an event store stores everything that produced said answer. Where a relational database holds an entity’s current status and nothing else, an event store holds every change that produced that status, in sequence, permanently.

DATABASE · CURRENT STATE
One row, overwritten

Each change replaces the last value. The row says where the student is today, not how they got there.

IDSTATUSCOURSESCITY
s-1registered0Amsterdam
0 earlier values are gone for good.
EVENT STORE · EVERY CHANGE
An ordered history, appended

Each change is an immutable event, written after the last one and never written over.

1,204,326StudentRegisteredstudent:s-1
1 of 1 events kept, in order, for as long as the history matters.

Why store history instead of current state?

History answers questions that current state cannot. With only the current state, you know where the system is, but with full history you know how it got there, what it looked like at any past moment, and what you would find if you interpreted the same facts differently.

Keeping events in an audit log is enough for compliance, but the value compounds when a live application can retrieve and act on that history quickly enough to make timely, data-driven decisions while the request is still in flight.

The other payoff arrives later, when the business asks a question nobody anticipated at design time. Because the changes themselves were never thrown away, a new question is answered by reading the history rather than by wishing the data still existed.

DATABASE · ONE ROW1 VALUEKnows today, and nothing before it0123day 1day 10day 20todayoverwrittencourses: 3
Courses on day 12?that value was replaced
?
EVENT STORE · SIX EVENTSEVERY VALUEKnows every day, from the events0123day 1day 10day 20today+1+1-1+1+1
Courses on day 12?3 of 6 events applied
2
The row holds the answer to one question. The log holds the answers to all of them, including the ones nobody has asked yet.

What does an event store guarantee?

An event store guarantees consistency at the moment of append, immutability once an event is written, and strict ordering on read. The first is crucial because every new event is checked against the history already recorded, so conflicting facts are rejected before they enter the record rather than untangled after they corrupt it.

It helps to notice which of these is active and which is passive. Immutability and ordering describe how events sit at rest, but the consistency check runs on every single write, and it is what lets an event-sourced application enforce business rules structurally rather than hopefully, whether the rule is that no one registers twice or that no constrained resource is oversubscribed.

How does an application get current state back out of events?

Through an operation called sourcing, which reads one entity’s events in order and applies each one to a model until the model reflects everything that has happened to that entity. Out of a store holding billions of events, only those belonging to the entity in question are retrieved, which is exactly why efficient per-entity retrieval is a defining requirement of an event store.

Even sourcing a long history of a single model on every request would be too slow for production, which is where snapshots and caching come in. A snapshot periodically stores the computed state of an entity, so the application loads the most recent snapshot and applies only the events recorded after it. The performance section below walks through the mechanics.

What is the difference between event sourcing and a replay?

Event sourcing rebuilds the state of one entity for an operational decision, while a replay walks a much larger span of history to answer an analytical question. The two operations read the same events but serve different masters. Sourcing asks what is true about this one entity right now, and a replay asks what the entire history reveals when read end to end, ranking, counting, and aggregating across every entity the system has ever touched.

Replays are how an event-sourced system builds entirely new read models out of old data, which is the pattern CQRS describes, where the write side records events and the read side serves views built from them.

SOURCINGOne entity, one decision

The index returns only student s-1’s events, folded into current state.

REPLAYAll history, one new question

A cursor reads the whole log in order to build a view nobody planned for.

ONE GLOBAL LOG · EVERY ENTITY5 OF 10 READ
1StudentRegisteredstudent:s-1
2CourseCreatedcourse:c-9
3StudentRegisteredstudent:s-2
4CourseSubscribed · c-9student:s-1
5CourseCreatedcourse:c-4
6CourseSubscribed · c-9student:s-2
7AddressChangedstudent:s-1
8CourseSubscribed · c-4student:s-1
9CourseSubscribed · c-4student:s-2
10CourseUnsubscribed · c-9student:s-1
MODEL · STUDENT s-1
FOLDED FROM 0 EVENTS
registered?
city?
courses?
Fast because it is narrow. Five events about other entities are never touched.

Can you use Postgres as an event store database?

Postgres can act as an event store, but it is not designed around the access patterns and guarantees an event store needs. Every append requires the consistency check described above, and evaluating that condition efficiently against a table.

As the event store grows, the table itself becomes the constraint. There are ways to work around those limits, but they move into increasingly specialized engineering territory, turning your database into a specialist event-store project of its own. And requiring engineers with special skills and tying the project’s success to them, eating away resources from the business problem to be solved originally

That makes Postgres a workable starting point, but a less suitable foundation for a production event store than infrastructure designed specifically for the job. With Axon Server, event storage, consistency, replication, and the operational concerns around running an event store are built into the system rather than layered onto a general-purpose database.

Postgres can hold your events, but Axon Server is built to run your event store. The question isn’t whether Postgres can do it, it’s how much engineering you want to put around a database before it starts behaving like a system that was designed for this purpose.

A separate whitepaper puts numbers on that question, walking through what it actually costs to build an event store yourself once replication, ordering, recovery, and evolution become your responsibility.

Can you use MongoDB as an event store database?

MongoDB is an excellent document database, and storing events as documents works well at small scale. The gaps appear in the same places every DIY event store eventually encounters them.

Strict, gap-free ordering across concurrent writers is something you have to construct and defend yourself. Conditional appends become application logic wrapped in transactions rather than guarantees provided by the storage engine. And retrieving one entity’s complete, ordered history from billions of documents means designing and maintaining the indexing strategy yourself.

MongoDB can store events, but it’s a less suitable foundation for an event store than infrastructure designed specifically for event storage. MongoDB still has a role on the read side, where its document model and query flexibility shine.

Keep the event store as the source of truth, and let MongoDB serve the read models and projections built from it.

PostgreSQLCLIENT / SERVER8 TO BUILD
YOU BUILD ITGlobal order under concurrent writers
YOU BUILD ITConditions across entities
YOU BUILD ITCatch-up subscriptions
YOU BUILD ITSnapshots
PostgreSQLtable · unique constraint · index
YOU BUILD ITPer-entity retrieval at billions
YOU BUILD ITHigh availability
YOU BUILD ITRouting to the warm instance
YOU BUILD ITRewriting events for erasure
MongoDBDOCUMENT DATABASE7 TO BUILD
YOU BUILD ITGlobal order under concurrent writers
YOU BUILD ITConditions across entities
YOU BUILD ITCatch-up subscriptions
YOU BUILD ITSnapshots
MongoDBcollection · unique index · replica set
YOU BUILD ITPer-entity retrieval at billions
BUILT INHigh availability
YOU BUILD ITRouting to the warm instance
YOU BUILD ITRewriting events for erasure
You build itBuilt inNot available

Can you use Kafka as an event store database?

No. Kafka is a message log built to move data through a system at high rates, and it does a great job at that. An event store is built to be the source of truth a system reasons about. The distinction is not about scale or durability, both of which Kafka has in abundance.

It comes down to the same two operations that define an event store anywhere else.

Kafka performs no validation of conditional appends. A producer writes to a partition and the broker accepts it, because the broker has no notion of the history that the writer is supposed to respect. Nothing checks whether a second registration contradicts the first, so the contradiction lands in the log and every consumer downstream inherits it.

The second gap is retrieval. Getting one entity’s complete, ordered history out of Kafka means replaying a partition from the beginning or maintaining a compacted topic keyed by entity, and neither gives you the indexed per-entity read that sourcing depends on. Compaction makes it worse, because compaction discards the intermediate records, and those are the history you were keeping in the first place.

Of course you can go that route, but congratulations, you now built an event store on top of Kafka, that you need to maintain for as long as your application lives.

Kafka earns its place beside an event store rather than instead of one. Keep the event store as the system of record, and let Kafka carry events outward to the systems that consume them.

Is it slow to event source millions of events?

It would be if systems actually did that on every request, and the reason they do not is a two-layer mechanism. Consider an entity whose history spans five thousand events.

With snapshots taken every hundred events, the first four thousand nine hundred are compressed into a single stored state by storing what the entity’s state was at that point. When a request arrives, the application loads that snapshot, applies only the few dozen events recorded since, and responds fast, without touching the thousands of events underneath.

Underneath is the operative word, because those events are compressed out of the hot path, not thrown away. If a bug corrupted the snapshots, the full history still exists to source from scratch and rebuild them correctly, and if a new analytical question arrives, the complete record is there to replay. Snapshots buy speed without spending history.

The second layer is aggregate caching, which removes the event store from the hot path on reads entirely for most cases. When the same instance of an application is always responsible for the same entity, that entity’s state is often still in memory from the last request, so the application applies its decision directly from cache and sends only the resulting append to the store. The consistency check in the event store makes this safe, because it verifies that the application’s view of history is current before accepting the event. Without that verification, a stale cache would write conflicting facts into the event store, and that would be the end of the system’s trustworthiness.

NO SNAPSHOTSource everything

Apply every event since the entity was created.

event 1event 5,000
0events applied before the decision
SNAPSHOT POLICYLoad snapshot, apply the tail

With a policy of one snapshot per 100 events, events 1 to 4,900 are folded into one stored state.

SNAPSHOT @ 4,900
event 1event 5,000
0events applied before the decision
AGGREGATE CACHEState still in memory

Same entity, same instance, state still in memory from the last request. The store only verifies the append.

IN MEMORY · 0 EVENTS READ
event 1event 5,000
0events applied before the decision
Snapshots buy speed without spending history. All 5,000 events stay in the store, ready to rebuild a snapshot or answer a replay.

What does it cost to run an event store?

Less than many teams expect, and potentially less than they already spend working around tools not designed for long-term event retention. Keeping years of history in Kafka, for example, can mean over-provisioned broker storage or additional tiered-storage tooling. A purpose-built event store makes long-term retention a core capability.

Backups can also be more efficient. Because historical events are immutable, unchanged data does not need to be backed up from scratch every time. Incremental backups can focus on new data rather than recapturing the entire event history.

As data grows, multi-tier storage keeps frequently accessed events on faster, more expensive disks while moving older history to cheaper storage. Axon Server automates this process, keeping historical events available for replay and audits without requiring teams to build and maintain their own tiering logic.

How does an event store handle GDPR erasure requests?

GDPR’s right to erasure requires personal data to be erased when applicable. It does not prescribe a specific technical mechanism or require systems to preserve an unbroken event history. Preserving that history while meeting erasure obligations is an architectural choice.

Axon Server’s GDPR module uses cryptographic erasure, also known as crypto shredding. Personal fields are encrypted with keys associated with individual data subjects when events are written. When an erasure request is processed, destroying the relevant key makes those fields permanently unreadable while leaving the event history intact. Replay and auditability remain available for the data that can still be read.

The trade-off is key management. Because encrypted fields must be decrypted when accessed, the key management system becomes a dependency in the read path. That dependency needs to be designed for the availability and performance requirements of the application.

Crypto shredding only protects fields encrypted at write time. If personal data is inadvertently embedded in an event without encryption, destroying a key cannot erase it. In that case, event transformation can rewrite or remove the affected fields across relevant events. This approach requires identifying the affected data and managing the transformation carefully. Separating personal information from the record of what happened makes both approaches more practical, but neither is automatic or cost-free.

Both erasure methods must also be integrated into the system’s consistency and audit mechanisms. In Axon Server, the erasure request can be represented as an event, subject to the application’s consistency rules, so the system retains a record that the request was processed.

Benefits of an event store: an example

Everything highlighted in this page can be shown in an example of a single university system; follow one student through it.

Before any event reaches the store, the application decides what has to be true for that event to be valid, and attaches that requirement to the append as a condition. A request to register a student becomes an append carrying the “student registered” event alongside a condition: no registration already exists for this student. The event store evaluates that condition against the current history at the moment the append arrives, rather than trusting whatever the application assumed was true when it issued the request.

The story starts when the student registers. The application sends the append with its condition, the store checks the history, confirms no prior registration exists, and accepts the event into the record. Moments later a duplicate request arrives, perhaps from an impatient double click, carrying the same append with the same condition. This time the history already contains the registration, the condition fails, and the store rejects the event before a second registration can ever exist. No cleanup job, no deduplication logic downstream, and no idempotency key bolted on.

Years pass and the student’s history grows to five thousand events, registrations, course subscriptions, address changes, and everything between. When the student applies for a diploma, the application needs their complete current state to decide, and sourcing five thousand events for one decision would be slow. Because the store has been snapshotting every hundred events, the application instead loads the latest snapshot, applies the few dozen events recorded after it, and answers within a few milliseconds.

On the busiest days even that is more work than needed, since the application instance responsible for this student often still holds their state in memory from the previous request, appends the new event based on the model straight from cache, and relies on the store to verify the cache was up to date before accepting.

Let’s construct a conflict, our student and one other both try to subscribe to a course with a single remaining spot, at the same moment, through different application instances. Each append arrives promising it has read the latest events for both the student and the course, and both promises cannot hold, because whichever append lands first changes the course’s history. The store accepts one subscription, the course fills, and the second append is rejected, so that application instance re-reads the history, sees the course is full, and tells its student to choose another. The course never was overbooked, not even for a millisecond.

Long after all of this, the university asks which class has been the most visited in its history, a question the system was not designed to answer initially. No table holds that answer, but the events do. A replay walks every subscription and unsubscription ever recorded, counts registrations against departures per course, and ranks the result, a brand-new insight computed entirely from facts that were kept instead of overwritten. And when an audit reveals that email addresses were accidentally written into some of those events years ago, event transformation removes the personal fields from billions of records while every fact of what happened stays intact. Accurate answers and real business knowledge all thanks to the events stored over time.

DUPLICATE REQUESTSame append, same condition

A double click sends the registration twice.

ONE SPOT, TWO WRITERSTwo students, one remaining spot

Two appends through different application instances.

TWO REQUESTS
REQUEST 1APPEND

StudentRegistered s-1, condition: no registration for s-1

EVENT STORE
320CourseCreated c-9course:c-9
321StudentRegistered s-7student:s-7
WHAT THE STORE DOES
The application attaches the condition to the append.

Axon Server: An Event Store Built for Reliability and Consistency

Axon Server is a purpose-built event store with consistency validation, efficient per-entity retrieval, snapshotting, multi-tier storage, and event transformation. These capabilities are built into the platform, reducing the need for teams to develop and maintain custom event infrastructure.

Axon Server supports large, long-lived event histories, with customers operating systems containing billions of events and many terabytes of data.

For engineering and product teams, that means

01

High availability by design. Clustered architecture replicates data across nodes to eliminate single points of failure.

02

Consistency across multiple entities. Dynamic consistency boundaries let teams enforce cross-entity guarantees without having to finalize aggregate boundaries before the first production event.

03

Adaptable event histories. Event transformation lets teams evolve how historical data is structured and interpreted without rewriting the underlying log.

04

Sustained query performance. Per-entity retrieval, snapshotting, and multi-tier storage help keep access efficient as event histories grow.

05

Less infrastructure to maintain. Teams can focus on product development instead of building and operating custom mechanisms for event storage, retrieval, and consistency.

For leadership, the result is a more durable foundation for enterprise systems. Teams can evolve business capabilities without repeatedly revisiting the infrastructure that supports them.

01 · SEGMENTSAppend to the log

New events go to the end of the current segment. Closed segments are never changed in place.

segment 1CLOSED
segment 2CLOSED
segment 3CLOSED
segment 4OPEN
02 · INDEXFind one entity

In aggregate-based contexts, a global index points to the latest event and per-segment pointers lead back, skipping segments in between. DCB contexts use a different index.

order:o-7→seg 4 · latest←seg 3←seg 2←seg 1
03 · SNAPSHOTSSkip the long tail

Computed state at a known position, kept in its own store. The application decides when to take one.

order:o-7 @ 800order:o-7 @ 900with a policy of one snapshot per 100 events
04 · TIERSKeep years of history

Closed segments move off primary disks by age or size.

PRIMARY · FAST DISK
segment 1segment 2segment 3segment 4
OTHER TIER · ARCHIVE
2019 … 2025
Each layer has one job. Together they keep appends cheap, reads narrow, and the full history available for as long as the business needs it.
01Leader receives the append
02Replicated to the group
03A node goes down
04It returns and catches up
APPLICATIONAxon Framework clientappend event 7
REPLICATION GROUP · 3 PRIMARY NODESMAJORITY = 2
axonserver-1LEADER

writes event 7

axonserver-2

waiting

axonserver-3

waiting

An append is confirmed once a majority of the primary nodes has stored it. With three primary nodes that is two. Losing one costs no data and no availability.

Why one system for both storing events and routing messages?

Because in a live event-sourced system, where a message is handled determines how fast the history can be used. Applications do not exchange only events, since a command such as “change my address” is the intent to do something, and the event is the proof that it happened. That intent has to reach the right place, because aggregate caching only works when requests for the same entity consistently land on the same application instance, where that entity’s state is already warm in memory. Route the command elsewhere and the cache is cold, the application sources from scratch, and the speed the architecture promised evaporates.

Splitting storage and routing across two systems means keeping two views of ownership and order aligned with each other, which is yet another distributed-systems problem acquired for no benefit. Combining them means the knowledge exists once, which is why Axon Server embodies both jobs in a single integrated system.

TWO SYSTEMSBroker and database, routed apart

The broker does not know which instance holds the order’s state.

AXON SERVERRouting and storage in one system

The routing key sends every command for o-7 to the same instance, as long as the set of instances is stable.

COMMANDS · ORDER o-7
AddItem1
ApplyDiscount2
ConfirmOrder3
ROUTER
Generic brokerround robin
APPLICATION INSTANCES
instance 1
idle
instance 2
idle
instance 3
idle
EVENTS READ0to handle 0 commands
A cache only pays off if the next command finds it. When the system that routes the command also knows where the entity lives, it does.

Turning event history into business intelligence

Your event history contains far more information than your application needs to operate. It records the facts behind every decision and change, creating a valuable source of business intelligence. The problem is that accessing that history has traditionally required engineering work.

When a business team has a new question, engineers typically need to build a projection, replay the relevant events, and create a purpose-built database before anyone can get an answer. That makes every new question an engineering project.

Axoniq Insights, part of Axon Server, removes that dependency.

  • Let business and data teams query event history directly, in SQL or plain language, without asking engineering to build a new projection or pipeline.

  • Answer questions nobody anticipated when the system was built, in days instead of weeks.

  • Keep engineering focused on the application instead of servicing every new analytical request that comes in.

The data already exists. Insights makes it directly queryable, so engineering stops being the bottleneck between a question and an answer, and other departments get real business intelligence from history the system was already recording.

How do teams get started?

Most teams start with the one area where history matters most, such as payments, claims or orders, and grow from there. There is no need to replace existing systems on day one. Axon Server runs alongside the databases and tools already in place, and each new area adds to the same history.

A short conversation with our team is usually enough to find the right first step for you.

STEP 1Payments

Start where history matters most, such as disputes and refunds.

STEP 2Claims

Add the next area. Its records join the same history.

STEP 3Orders

Grow one area at a time, at your own pace.

ONE GROWING HISTORYEACH SQUARE IS A CHANGE THAT WAS KEPT
Your current systems keep running. Nothing has to be replaced on day one.DATABASESREPORTSTOOLS

🤔
Frequently

asked
questions

🤔
Frequently asked

questions

What is an event store in simple terms?

An event store is a system that saves every change in your application as an immutable, ordered event rather than overwriting current state. It retrieves history efficiently even at billions of events and validates each new event against the existing history before accepting it.

Is Kafka an event store?

No. Kafka is a message log built to move data through at high rates, while an event store is built to be a source of truth. Kafka offers no consistency guarantees on append and no efficient index for retrieving one entity's complete history, which are the two capabilities that define an event store.

Can I use Postgres or MongoDB as an event store?

At a small scale yes, and both have limitations. Gap-free ordering under concurrent writers, consistency validation on every append, and efficient per-entity history retrieval all become application logic you build and maintain rather than properties of the storage engine. MongoDB fits naturally on the read side instead, holding the projections built from the event store.

What is the difference between an event store and a database?

A conventional database typically stores current state, while an event store preserves the sequence of events that produced it. This provides a durable history of changes and, in systems with built-in consistency validation, helps ensure new events comply with defined rules.

Is an event store slower than a normal database?

Not in everyday operation. Snapshots compress long histories into stored state so requests apply only recent events, and aggregate caching often answers from memory without touching the store at all, so an entity with thousands of events loads about as fast as one with a handful.

What is the difference between sourcing and replay?

Sourcing reads one entity's events to rebuild its current state for an operational decision, while a replay walks a larger span of history to answer analytical questions or build new views across every entity in the system.

How does an event store handle GDPR if events can't be deleted?

Through crypto shredding or event transformation. Crypto shredding makes encrypted personal data unreadable by destroying its encryption key. Event transformation removes or replaces specific personal fields within existing events while preserving the surrounding event history. Both approaches aim to meet erasure requirements without discarding the record of what happened.

What is Axon Server?

Axon Server is Axoniq's purpose-built event store and message router, providing consistency validation on append, snapshotting, multi-tier storage, event transformation, and clustered high availability in a single system.