Routing Strategies

Learn how to configure routing strategies for distributing JSON-RPC requests


The Ironforge Load Balancer provides 2 types of routing strategies for distributing your incoming RPC requests across multiple Solana RPC endpoints:

  • Primary Routing: The default routing strategy for all RPC methods.
  • Dynamic Routing: Allows you to assign specific endpoints for specific RPC methods.

Routing Strategies

Primary Strategy

Primary strategy refers to the default routing strategy for all RPC methods. All incoming requests will be routed based on the Primary Strategy unless a Dynamic Strategy is defined for a specific RPC method.

  • Go to the "Load Balancer" section in the Ironforge dashboard, select your project, create a new project if you haven't already.
  • You will find the "Routing Strategies" section in the project's page.
  • Select the Sequential or Parallel option for your Primary Strategy.
  • Select the RPC endpoints you want to use for the routing strategy. You can add multiple endpoints and order them based on your preference.
  • Click "Save" to save your changes.
  • You can always come back and edit the routing strategy as needed.

Screenshot of Sequential Algorithm

Dynamic Strategy

Dynamic routing will always take precendence over the Primary Routing strategy. You can assign specific endpoints for specific RPC methods, giving you more control over how requests are routed based on the RPC method.

You can add a Dynamic route by clicking on Add Route in the "Dynamic Strategies" section in the bottom of your project's "Routing Strategies" page.

It will lead you to a new page where you can add the following details:

  • Name: A name for the dynamic route.
  • Cluster: The RPC endpoint cluster to point to, i.e. mainnet-beta, devnet, etc.
  • Routing Algorithm (Sequential or Parallel): The routing algorithm to use for this dynamic route. This routing algorithm will only be used for this specific dynamic route.
  • Endpoints: The RPC endpoints to use for this dynamic route. You can add multiple endpoints and order them based on your preference.
  • RPC Methods: The RPC methods for which this dynamic route should be used. You can add multiple RPC methods.

Screenshot of Dynamic Routing