Method-specific Routing

Method-specific Routing lets you apply a custom routing strategy per RPC method to optimize reliability, cost, and provider compatibility.

Method Routing lets you override the gateway’s Global routing strategy for specific RPC methods. It’s designed for cases where not all calls should be treated the same: some methods are mission-critical, some are expensive, and some may not even be supported by every provider behind your gateway.


Common reasons to use Method Routing

Reliability for critical writes (with a dedicated RPC provider)

For state-changing methods (for example, transaction submission), you may want the most reliable or best-performing provider every time. Method Routing allows you to force those methods to go to a specific provider (or a tighter set of providers), independent of the gateway’s default routing behavior.

Cost and capability optimization

Some methods are more expensive than others, and some providers price them differently—or don’t support them at all. With Method Routing, you can route high-cost or specialty methods to a cheaper provider or to the provider that actually supports them, while keeping everything else on your default setup.

RPC Method allowlisting (traffic control)

You can treat Method Routing as an allowlist by defining overrides only for the methods you want to permit through a given gateway configuration. This helps enforce stricter control over which RPC methods are expected to be used, and reduces the chance that unexpected or unwanted methods are routed through the same path.


How It Works

  • Global routing is the default: The gateway uses endpointRouting (Priority Failover or Load Distribution) for all RPC methods unless a method override exists.
  • Method overrides take precedence: If the request method matches methodRoutingOverrides[].methods, the gateway uses that rule’s own routing strategy and its own endpoint list/order/weights (separate from the global configuration).
  • Fallback to global routing: If no override matches, or an override is inactive, the request is routed using the global endpointRouting configuration.

How to enable Method-specific Routing

📘

Update Gateway

PATCH /v4/manage/gateway/{id}
Update method-specific routing in an existing gateway by using the endpointRouting parameter.

Explore Docs →
Prefer Dashboard Instead →

Open your custom gateway

Open the custom gateway where you want to enable Method-specific Routing.

Open your custom gateway

Important Information

  • You can add multiple endpoints to each method rule to back up your primary provider and ensure a graceful failover.
  • Tatum endpoints are pre-created and can be added as one of the endpoints, use at least two endpoints per rule to maintain a solid backup strategy.
🚧

Attention

If no active override applies, the gateway automatically falls back to your global routing configuration (Priority Failover or Load Distribution), ensuring all other methods continue working normally.