> For the complete documentation index, see [llms.txt](https://docs.rumi.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rumi.systems/performance/canonical-benchmark.md).

# Canonical Benchmark

This section presents results from a canonical benchmark that measures the end-to-end performance of Rumi's core message processing capabilities.

## What is Benchmarked

The canonical benchmark measures the **Receive-Process-Send flow** of a clustered microservice, which represents the fundamental operation pattern of most Rumi applications:

1. **Receive** - AEP Engine receives an inbound message
2. **Dispatch to Handler** - Engine starts a transaction and dispatches message to microservice
3. **Process** - Microservice message handler executes:
   * 3.1. **Read and write state POJOs** - Business logic accesses and modifies state
   * 3.2. **Send outbound messages** - Business logic creates response messages (held by engine)
4. **Return from Handler** - Control returns to the engine
5. **Commit** - Engine commits the transaction, which includes:
   * Replicating state changes and outbound messages to backup
   * Persisting changes to disk (asynchronous, non-blocking)
   * Receiving stability acknowledgment from backup
6. **Send Outbound Messages** - Engine releases held messages on commit completion

This flow exercises the complete Rumi stack including messaging, state management, persistence, cluster replication, consensus protocol, threading, and serialization.

## Key Metrics

The benchmark reports two primary metrics:

### Wire-to-Wire (w2w) Latency

* Measures time from inbound message arrival to outbound message transmission
* Reported as 50th, 99th, and 99.9th percentiles
* Includes all processing, persistence, and replication overhead
* Measured in **microseconds (µs)**

### Maximum Throughput

* Measures messages processed per second under saturated load
* Tests the platform's ability to handle high-volume scenarios
* Measured in **messages per second**

## Test Methodology

The benchmark is designed to provide:

* **Reproducibility** - Consistent hardware, software configuration, and test parameters
* **Relevance** - Tests real-world clustered microservice patterns
* **Transparency** - Full disclosure of test configuration and methodology
* **Comparability** - Consistent methodology across releases enables direct comparison

## Results Organization

Performance results are organized by Rumi release. Each release page includes:

* Complete latency and throughput results
* Performance analysis and characteristics
* Tuning recommendations
* Comparisons with previous releases (where applicable)

## Next Steps

* [Test Description](/performance/canonical-benchmark/test-description.md) - Detailed test methodology and configuration
* [Test Results](/performance/canonical-benchmark/test-results.md) - View performance results by release
* [Performance Benchmark Suite](/performance/benchmark-suite.md) - Full benchmark suite documentation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rumi.systems/performance/canonical-benchmark.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
