Blockchain RPC down again?

Tired of inconsistent blockchain RPC availability? RPCRouter seamlessly consolidates multiple RPC endpoints into a singular, high-speed, and dependable super-endpoint.

Unify Your RPC Endpoints

RPCRouter is an open-source high-availability, low-latency, and failover-protected endpoint designed to optimize your RPC requests' latency and reliability.

Seamless Failover

Automatically reroutes failed requests, maintaining uninterrupted service for your users.

Predictive Routing

Utilizes real-time stats on latency and failure rates to dynamically select the optimal endpoint.

Front-Runners Mitigation

Intelligently broadcasts transactions to effectively shield against potential front-running attacks.

Enhanced De-Fi Security

Optionally performs multiple parallel RPC response verifications to ensure node integrity and prevent deception.


Deploy RPCRouter within your own infrastructure for critical services like bridges, enhancing control and security.

Commercial support

Get commercial support for RPCRouter from the team behind RPCRouter.

Compatible with all leading RPC providers

Alchemy Chainstack Infura QuickNode AllNodes

Plug & Play

Already compatible with your Web3 App

RPCRouter works with all popular Web3 libraries. Just switch the endpoint—no code changes needed.

import Web3 from 'web3';
const routerUrl = ""
const web3 = new Web3(
    new Web3.providers.HttpProvider(routerUrl),

RPCRouter is an open-source project that consolidates multiple blockchain RPC endpoints into a single, high-availability, low-latency endpoint, ensuring optimal and reliable RPC services for your applications.

Get started with RPCRouter

Save this file as docker-compose.yml, cd to the directory and run docker compose pull && docker-compose up -d to start the router.

    container_name: rpcrouter
    image: "containerman17/rpcrouter:v1.0.0" # make sure to run docker-compose pull to get the latest version
    restart: always
      - "3024:3024" # or "" if you want to bind to localhost only
      - "RPCROUTER_CROSS_CHECKS=0" # 0 - disable, 1 - double check (1 extra), 2 - triple check (2 extra)
      # the format is "RPCROUTER_URL_<network>_<index>=<url>"
      - "RPCROUTER_URL_fuji_1="
      - "RPCROUTER_URL_fuji_2="
      - "RPCROUTER_URL_fuji_3="
      # another network
      - "RPCROUTER_URL_fantom_1="
      - "RPCROUTER_URL_fantom_2="
      - "RPCROUTER_URL_fantom_3="

We recommend co-locating your router with your code. For frontend applications, you should deploy RPCRouter on in multiple regions.


The configuration for RPCRouter is done through environment variables. Below is a description of the configuration options used in the example above:

In the example provided, the following endpoints are configured:

These environment variables should be set in the docker-compose.yml file to configure RPCRouter with the desired endpoints and cross-checking behavior.

Replace Your Current Endpoints

RPCRouter endpoints seamlessly integrate with your web3 application as standard endpoints. No modifications are necessary to amalgamate multiple RPC endpoints into a singular, reliable, and low-latency endpoint.

JS/TS web3.js

import Web3 from 'web3';
const routerUrl = ""
const web3 = new Web3(
    new Web3.providers.HttpProvider(routerUrl),

JS/TS ethers.js

import { ethers } from "ethers";
const routerUrl = ""
const provider = new ethers.providers.JsonRpcProvider(routerUrl);

Bash + curl

curl \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'


from web3 import Web3
routerUrl = ""
web3 = Web3(Web3.HTTPProvider(routerUrl))

Websocket Support

Regular requests

RPCRouter works in HTTP->WebSocket, WebSocket->HTTP, HTTP->HTTP, and WebSocket->WebSocket modes.

Protocol concerns are eliminated, as RPCRouter establishes dual HTTP/WS connections to each node, optimizing through a latency prediction model.

Quick tip: Opt for WS endpoints when available — they reduce latency by milliseconds effortlessly.

eth_subscribe and eth_unsubscribe

Subscribe and unsubscribe methods are not available yet.

Latency prediction

RPCRouter keeps track of the last 10 requests to each endpoint, measuring success and response time. For every request, an endpoint with the lowest latency is chosen. Retries are treated as long-running requests. To prevent the router from getting stuck in a local optimum, stats are discarded after 5 minutes.

Response Cross-Check (Advanced)

Fine-grained control for DeFi, bridges, and scenarios where data integrity is critical. RPCRouter mitigates stale or malicious RPC responses via consensus validation against multiple endpoints.

Configuration Options:

Important Note: Cross-checking introduces additional request overhead and may increase response times. This feature is primarily intended for use cases where data reliability outweighs speed concerns.


Most blockchain RPC providers offer two types of endpoints: HTTP and WS.

Connecting to Your RPCRouter

Always include both the HTTP and WS endpoints when connecting to your RPCRouter. While WS generally offers faster performance due to its persistent connection and the lightweight nature of the WebSocket protocol, HTTP can provide greater stability in some cases.

Recommendations for Your Code

Prioritize WS endpoints for optimal performance. Only use HTTP in situations where WebSocket support is unavailable, such as in cloud functions or environments that don’t support the protocol (e.g., when making requests with curl).