A high-performance benchmarking tool for comparing RPC providers on Base and Ethereum networks.
- Measures latency: average, p50, p95, p99
- Compares HTTP and WebSocket performance
- Benchmarks common providers: Alchemy, Infura, PublicNode, Ankr, Blast, BlockPI, Coinbase, DRPC, LlamaRPC, 1RPC, QuickNode, Chainstack, GetBlock, Tenderly
- Uses async high-speed testing with
aiohttpandwebsockets - Selects the fastest healthy RPC endpoint automatically
RPC performance directly impacts trading bots, DeFi execution speed, and real-time applications. This tool helps identify the fastest and most reliable provider for latency-sensitive infrastructure.
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtThese public HTTP providers work without credentials when available for the selected network:
PublicNodeAnkrBlastBlockPICoinbasefor BaseDRPCLlamaRPC1RPC
Alchemy and Infura are enabled when you provide API keys:
$env:ALCHEMY_API_KEY="your_alchemy_key"
$env:INFURA_API_KEY="your_infura_key"You can also override any endpoint directly:
$env:ALCHEMY_BASE_HTTP_URL="https://base-mainnet.g.alchemy.com/v2/..."
$env:ALCHEMY_BASE_WS_URL="wss://base-mainnet.g.alchemy.com/v2/..."
$env:INFURA_ETHEREUM_HTTP_URL="https://mainnet.infura.io/v3/..."
$env:INFURA_ETHEREUM_WS_URL="wss://mainnet.infura.io/ws/v3/..."Direct URL overrides use this format:
PROVIDER_NETWORK_HTTP_URL
PROVIDER_NETWORK_WS_URL
PROVIDER_HTTP_URL
PROVIDER_WS_URL
Examples:
$env:QUICKNODE_BASE_HTTP_URL="https://your-endpoint.base-mainnet.quiknode.pro/..."
$env:QUICKNODE_BASE_WS_URL="wss://your-endpoint.base-mainnet.quiknode.pro/..."
$env:CHAINSTACK_ETHEREUM_HTTP_URL="https://your-chainstack-node"
$env:TENDERLY_BASE_HTTP_URL="https://base-mainnet.gateway.tenderly.co/..."
$env:GETBLOCK_ETHEREUM_HTTP_URL="https://go.getblock.io/..."
$env:ONE_RPC_BASE_HTTP_URL="https://1rpc.io/base"Benchmark Base over HTTP and WebSocket:
python rpc_benchmark.py --network base --transport all --requests 50 --concurrency 10Benchmark Ethereum HTTP only:
python rpc_benchmark.py --network ethereum --transport http --requests 100 --concurrency 20Benchmark a specific set of providers:
python rpc_benchmark.py --network base --transport http --providers publicnode,ankr,quicknodeBenchmark every configured common provider:
python rpc_benchmark.py --network base --transport all --providers allProvider Network Type Avg(ms) P50(ms) P95(ms) P99(ms) Success
-------------------------------------------------------------------------
Alchemy base http 104 101 120 130 100%
Infura base http 118 116 140 155 99%
PublicNode base http 103 100 115 121 100%
Fastest healthy RPC: PublicNode (http) at 103 avg
https://base-rpc.publicnode.com
- Optimize trading infrastructure
- Select the best RPC provider dynamically
- Monitor RPC performance over time
- Python
asyncio aiohttpwebsockets
Blockchain Infrastructure Engineer focused on performance optimization