A modern, time-driven database testing tool - the next generation of sysbench
RSBench is a next-generation database benchmarking and testing tool built in Rust.
Traditional database testing tools like sysbench have served the community well, but fall short in the cloud-native era. As databases evolved to become distributed, cloud-native systems with multi-region capabilities and new distributed SQL architectures, testing tools remained anchored in single-node assumptions.
RSBench bridges the following sysbench gaps with distributed-aware testing for modern databases:
- Thread-based load generation conflates concurrency with load
- Blocking I/O hides client-side bottlenecks
- Coordinated omission in latency measurements
- Implicit phases instead of explicit, deterministic behavior
- No distributed database support - lacks multi-region testing and distributed SQL awareness
RSBench is purpose-built for distributed SQL databases and cloud-native workloads while maintaining backward compatibility with sysbench workflows.
- Time Is the Primary Control Plane - Load is defined by time and rate, not by threads
- Backpressure Is a Signal, Not a Failure - Client-side pressure is observable
- The Client Must Never Lie - Client limits are explicitly tracked
- Database Workloads Are Stateful - Model sessions, transactions, prepared statements
- Test-as-Code Is the Default - Workloads are version-controlled artifacts
- Explicit Phases Instead of Implicit Behavior - Phase boundaries are clear and deterministic
- Accurate Benchmarking: Rate-based execution prevents coordinated omission
- Multi-Region Testing: Test distributed databases with region-aware routing
- Lifecycle Testing: Integrate with K8s events, test during upgrades and failovers
- Reproducible Tests: Deterministic workload generation with seeded RNG
- Rich Metrics: HDR histograms for accurate percentile measurements
- No Client Bottlenecks: Async runtime supports 10k+ concurrent connections
- Backpressure Visibility: Distinguish client limits from database performance
- Test-as-Code: YAML/TOML workload definitions with Git versioning
- CI/CD Integration: Thresholds and checks for automated regression detection
- Flexible Workloads: Declarative YAML or programmable Lua scripts
RSBench is currently in early development. Build from source to try it out:
git clone https://github.com/HaoW30/rsbench
cd rsbench
cargo build --releaseRSBench is built around several key components:
- Scenario Orchestrator: Time-driven execution with rate control
- Dual-Mode Runtime: Async (primary) and blocking (sysbench compatibility)
- Connection Pool: Backpressure-aware with multi-endpoint routing
- Workload Engine: Declarative YAML or programmable Lua
- Metrics Engine: HDR histograms with multiple output formats
- Event Integration: K8s events, webhooks, lifecycle testing
See the Architecture Documentation for details.
Drop-in sysbench replacement with time-driven, rate-based execution
What you'll get:
- Rate-based execution that maintains target QPS regardless of query latency
- Backpressure visibility - client saturation reported in metrics
- No coordinated omission - accurate latency measurement under load
- 10x higher throughput capacity than sysbench in async mode
- Deterministic testing - same seed produces same operations
- MySQL support with async and blocking runtimes
- HDR histogram metrics with text and JSON output
Multi-region testing with essential workload flexibility
What you'll get:
- Multi-region distributed mode with loose coordination
- Read/write split routing and region-aware execution
- K8s event integration - events trigger phase changes
- Failover event correlation with latency spikes
- PostgreSQL driver support
- Declarative YAML workloads covering 80% of use cases
- Fast, deterministic data generation engine
CI/CD integration, advanced workload scenarios, and transaction support
Monitoring integrations, web interface, and industry-standard benchmark suites
| Feature | Sysbench | RSBench |
|---|---|---|
| Load Generation | Thread-based (closed model) | Rate-based (open model) |
| I/O Model | Blocking | Async + Blocking |
| Coordinated Omission | Yes (latency skew) | No (accurate) |
| Backpressure | Hidden | Visible |
| Determinism | Limited | Full (seeded RNG) |
| Multi-Region | No | Yes |
| Test-as-Code | No | Yes (YAML/TOML) |
| Lifecycle Testing | No | Yes (K8s events) |
| Sysbench Compatibility | N/A | Yes (Lua scripts) |
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
# Clone the repository
git clone https://github.com/yourusername/rsbench
cd rsbench
# Build with all features
cargo build --all-features
# Run tests
cargo test
# Run benchmarks
cargo benchRSBench is licensed under the Apache License 2.0. See LICENSE for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
RSBench draws inspiration from:
- sysbench: The industry-standard database testing tool
- k6: Modern load testing with scenarios and executors
- Tokio: Rust's async runtime ecosystem
If you use RSBench in your research or benchmarking, please cite:
@software{rsbench,
title = {RSBench: A Modern Database Testing Tool},
author = {RSBench Contributors},
year = {2024},
url = {https://github.com/yourusername/rsbench}
}Status: 🚧 Early Development - Not yet production ready
Built with ❤️ in Rust