Benchmarking RocketMQ-Rust against Apache RocketMQ 5.5.0
AI disclosure: This article was generated by an AI assistant from the project’s public benchmark notes and pull requests. No new benchmark was run for this article.
The November 2026 RocketMQ-Rust benchmark produced two useful numbers: 1.79× the synchronous send throughput of Apache RocketMQ 5.5.0, and 0.96× its throughput when 256 asynchronous requests shared one connection. Which number matters depends on how the producer sends messages and what the Broker waits for before acknowledging them.
What was held constant
The Broker tests ran on one Intel i7-11700K host, using Docker Desktop and a WSL 2 Linux VM (kernel 6.18, 16 GB RAM). Services shared eight logical CPUs and the load generator used the other eight. Traffic stayed on loopback and the store used the container filesystem, not tmpfs. The Rust Broker used the release-image PGO and BOLT configuration. The Java Broker used the official Apache RocketMQ 5.5.0 image with its default OpenJDK 8 settings. The same Rust load generator drove both Brokers. The project rotated the run order after warm-up and reported medians of four to nine runs per test cell. No send failures were reported in those runs.
Broker: one workload, one answer
These are 1 KiB messages with one replica and asynchronous disk flush. Synchronous send means the client waits for each response. That is separate from the Broker’s disk flush policy.
| Workload | Java 5.5.0, msg/s | RocketMQ-Rust, msg/s | Rust / Java |
|---|---|---|---|
| Synchronous, one request outstanding | ~2.3k | ~4.0k | 1.79× |
| Async, 1 connection × 256 in flight | 116.6k | 112.4k | 0.96× |
| Async, 4 connections × 64 in flight each | 115.9k | 137.8k | 1.19× |
| Async, 16 connections × 16 in flight each | 100.9k | 123.7k | 1.23× |
| LitePull consumption | 107.7k | 140.0k | 1.30× |
Broker CPU time in the synchronous send fell from 381 to 137 µs/message. Repeating with a Java 5.5.0 client still showed a 1.47× synchronous advantage, while the asynchronous runs hit the Java client’s limit. Both outcomes are useful: verify that the client can drive the Broker before attributing a throughput plateau to the server.
Changing durability shifted the bottleneck. With synchronous flush, the four-connection result narrowed to 47.9k versus 46.2k msg/s (Rust versus Java), while the single-connection Rust result was slightly behind. Both Brokers waited on msync, which took about 2 ms per call on this setup. With three replicas, two required in-sync replicas, and asynchronous flush, Rust delivered 1.20–1.43× the Java throughput in the tested workloads. The three Brokers and Controllers shared the same CPU allocation, so that result reflects the local layout, not the capacity of replication across independent hosts.
Proxy: a tail-latency problem the median missed
In a separate Rust-before/Rust-after experiment, the Proxy handed a custom listener to Tonic. Its accepted TCP sockets still had Nagle’s algorithm enabled. Small HTTP/2 frames could wait for acknowledgements. Setting TCP_NODELAY on the accepted socket covered both plain and TLS entry points.
With one 1 KiB message per RPC, Linux Docker cluster mode and six runs per cell, the median of the run-level p99 values fell from 43.6 to 6.9 ms at 32 connections × 4 in flight. Throughput rose from 40.6k to 42.6k msg/s. At 1 connection × 256, p99 fell from 46.4 to 14.0 ms. The reported p50 did not change. A separate PGO experiment cut Proxy CPU per message by about 10% at 1 × 256 but moved p99 from around 14 to around 20 ms. Both measurements belong in a release decision.
The project also published Rust and Java Proxy throughput from the same host on different days. Those runs were not paired, so the Rust A/B above should not be read as a post-fix Java comparison.
Reproduce the workload before drawing a deployment conclusion
Use the repository’s client-production-benchmark for Broker sends and LitePull, or grpc_send_benchmark for Proxy sends. The benchmark documentation includes exact example commands. Record the commit or image digest, build flags, message size, connections and requests in flight per connection, replication settings, and flush policy. Keep each run’s JSON, failed-send counts and latency percentiles. If a release is meant to improve throughput without increasing tail latency, set a p99 budget up front.
The dedicated-host test plan separates the load generators and replicas. Long steady-state runs, cold reads, failover, and Proxy consumption remain outside the published comparison.
原文:https://www.a8q9.cn/en/article/benchmarking-rocketmq-rust-against-apache-rocketmq-5-5-0-7b1a3b.html