Turbine
Multi-chain RPC proxy with intelligent endpoint rotation. Unlike EVM-only proxies, Turbine works with any blockchain that speaks JSON-RPC over HTTP.
How It Works
┌─────────────────────────────────────────────────┐
│ TURBINE │
│ │
Client Request │ ┌─────────┐ ┌───────────┐ ┌─────────┐ │
POST /ethereum ───────>│ Route │───>│ Cache │───>│ Forward │──│──> Endpoint A ✓ (auth injected)
POST /bitcoin │ │ Resolve │ │ Lookup │ │ + Retry │ │
POST /solana │ └─────────┘ └───────────┘ └─────────┘ │
│ │ hit? │ miss │ │ │
│ │ │ │ │ │
│ │ return cached fail retry │
│ │ │ │ │
│ │ ▼ │ │
│ │ ┌──────────────────┐│ │
│ │ │ Endpoint Pool ││ │
│ │ │ ││ │
│ │ │ A ✓ B ✓ C ✗ │├─────│──> Endpoint B ✓ (auth injected)
│ │ │ round-robin / ││ │
│ │ │ weighted select ││ │
│ │ └──────────────────┘│ │
│ │ ▲ │ │
│ │ ┌───────┴────────┐ │ │
│ │ │ Health Checker │ │ │
│ ▼ │ │ │ │
│ ┌─────────┐ │ • block height │ │ │
│ │ Metrics │ │ • stale detect │ │ │
│ │ /metrics│ │ • auto-cooldown │ │ │
│ └─────────┘ └─────────────────┘ │ │
│ │
└─────────────────────────────────────────────────┘
Flow: Request ──> Route to chain ──> Check cache ──> Pick healthy endpoint
──> Inject auth (Basic/Bearer/Header) ──> Forward ──> On fail, retry next
Features
- Multi-chain — configure any number of chains, each with its own endpoint pool
- Round-robin & weighted rotation — distribute requests evenly or by weight
- Passive health tracking — automatically detects and skips failing endpoints
- Active health checks — background block-height polling to detect stale nodes
- Auto-retry — retries with a different endpoint on failure
- Response caching — per-method TTL cache with EVM/Solana presets
- Upstream authentication — per-endpoint Basic Auth, Bearer tokens, or custom headers
- Metrics — per-chain request/failure/cache stats via
/metrics
Install
As a Library
use Turbine;
async
Or embed in your existing axum app:
let turbine = from_config.unwrap;
let router = turbine.into_router;
// Merge with your own routes, add middleware, etc.
As a CLI
Configuration
See config.toml for a sample configuration. Generate one visually at turbine-config.pages.dev.
[]
= "127.0.0.1"
= 8080
[[]]
= "ethereum"
= "/ethereum"
= [
"https://eth.llamarpc.com",
{ = "https://rpc.quicknode.com", = { = { = "x-api-key", = "key-123" } } },
]
[]
= 3
= 30
[[]]
= "bitcoin"
= "/bitcoin"
= [
{ = "http://node1:8332", = { = { = "rpcuser", = "pass1" } } },
{ = "http://node2:8332", = { = { = "rpcuser", = "pass2" } } },
]
[]
= 3
= 30
= "getblockcount"
Authentication
Auth is optional per-endpoint. Three methods are supported:
| Method | Config | Use Case |
|---|---|---|
| Basic Auth | { basic = { username, password } } |
Bitcoin Core, self-hosted nodes |
| Bearer Token | { bearer = "token" } |
Managed RPC providers |
| Custom Header | { header = { name, value } } |
Alchemy (x-api-key), QuickNode |
Clients don't need credentials — Turbine injects them automatically when forwarding to upstream nodes.
Usage
# Ethereum
# Bitcoin (auth handled by Turbine, client sends plain request)
# Metrics