A Yellowstone Geyser gRPC endpoint benchmarking tool.
GeyserBench is a performance testing tool that connects to multiple Solana gRPC endpoints simultaneously and measures their speed and reliability in detecting transactions.
- Connect to multiple gRPC endpoints simultaneously
- Measure endpoint performance metrics:
- First detection rate
- Average delay
- Median and 95th percentile latency
- Simple summary output for quick comparison
- Detailed metrics for in-depth analysis
Prerequisites: Rust, plus cmake, a C++ compiler and OpenSSL headers (Linux: apt install cmake g++ libssl-dev pkg-config; Mac: brew install cmake). Unless PROTOC points to an existing protoc, the first build compiles protobuf from source and takes a few minutes.
git clone https://github.com/alchemyplatform/geyserbench.git
cd geyserbench
cargo build --releaseThe binary is written to target/release/geyserbench.
GeyserBench reads config.toml from the directory it runs in and creates a default one if none exists. Edit this file to customize your benchmark:
[config]
transactions = 1000
account = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
commitment = "processed"
[[endpoint]]
name = "Alchemy"
url = "https://solana-mainnet.g.alchemy.com"
x_token = "YOUR_ALCHEMY_API_KEY"
kind = "yellowstone"
[[endpoint]]
name = "Triton"
url = "https://YOUR_ENDPOINT.mainnet.rpcpool.com"
x_token = "YOUR_TOKEN_HERE"
kind = "yellowstone"
[[endpoint]]
name = "Helius"
url = "https://laserstream-mainnet-ewr.helius-rpc.com"
x_token = "YOUR_HELIUS_API_KEY"
kind = "yellowstone"
[[endpoint]]
name = "QuickNode"
url = "https://YOUR_ENDPOINT.solana-mainnet.quiknode.pro:10000"
x_token = "YOUR_TOKEN_HERE"
kind = "yellowstone"transactions: Number of transactions to measureaccount: Account address to monitor for transactionscommitment: Transaction commitment level (processed, confirmed, finalized)endpoint: Array of gRPC endpoint configurations:name: Name for the endpointurl: gRPC endpoint URLx_token: Authentication token (if required)kind: Geyser provider type (yellowstonefor Yellowstone gRPC endpoints)
-
Edit
config.tomlin the repository root with your endpoint details -
Run the benchmark from the repository root:
./target/release/geyserbench
GeyserBench provides both simplified and detailed output:
Finished tests results
endpoint 1: Win rate 85.23%, avg delay 0.00ms (fastest)
endpoint 2: Win rate 10.45%, avg delay 42.31ms
endpoint 3: Win rate 4.32%, avg delay 78.56ms
Detailed tests results
----------------------------------
Fastest Endpoint: endpoint 1
First detections: 82 out of 97 valid transactions (84.54%)
Delays relative to fastest endpoint:
endpoint 2:
Average delay: 42.31 ms
Median delay: 38.75 ms
95th percentile: 62.18 ms
Min/Max delay: 12.45/89.32 ms
Valid transactions: 97
examples/latency.rs opens a single Yellowstone gRPC stream and reports how many milliseconds above the fastest delivery your p50, p90 and p99 messages arrive. It is a steadiness measure, not total end-to-end latency.
It has the same prerequisites as Build from source.
export ALCHEMY_API_KEY=your-alchemy-api-key
cargo run --release --example latencyOptional settings: ACCOUNT (program or account to watch; default is the Pump.fun AMM program pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA), N (transactions to collect, default 20000), URL (default https://solana-mainnet.g.alchemy.com). Run it from a datacenter near where you serve users.