Fact or Myth: Gateways Always Outperform Direct RPC Endpoints

Written by
Mantas Ciuksys
September 19, 2024
3
min. read

Here's what we found: when working with blockchain application back-end, the choice between direct RPC endpoints and gateways can significantly impact performance, reliability, and system management.

The current industry standard for direct access might seem simple at first glance, but gateways offer several technical advantages that are hard to ignore. At Tatum, we provide both, but we're seeing an immense reduction in issues for our users when they use gateways.

Below is a quick breakdown of why gateways provide a more reliable, efficient solution compared to direct RPC endpoints.

You can try out any of the gateways directly through our platform.

Failover Management: Built-In Redundancy

A direct access node failure means immediate downtime unless you've set up manual failover procedures - and take our word for it, many blockchain apps do not have these failovers in place. Sure, you can set up auto failover management, but managing failovers on your own requires additional resourcing and monitoring, which adds complexity to your stack.

Gateways, on the other hand, handle failovers automatically. If a node becomes unresponsive, the gateway will query other active nodes in the network to maintain service continuity. This built-in redundancy ensures high availability without requiring manual intervention or complex configuration on the user’s end.

Fastest Routing: Optimized Latency

With direct access to RPC endpoints, devs are responsible for choosing the node, and often, that means you could be sending requests to a node that is geographically distant or experiencing high latency. This can massively slow down response rates.

Gateways optimize this by automatically routing requests to the closest or least congested node. This ensures lower latency and lightning-fast response times without requiring the user to manually manage node selection. And in systems where performance is critical, like DeFi, the difference in response time can lead to significant loss of funds.

Caching: Faster Access to Validated Data

We know that not everything in blockchain needs to be fetched directly from the RPC node. Gateways vastly improve response times through caching. Instead of querying nodes for frequently requested data, the gateway can serve cached responses - assuming they are still valid. This cuts down on redundant node queries, improving both speed and efficiency.

What’s crucial here is validation—our gateways ensure that cached data is validated with the nodes to guarantee correctness, so users can trust the information they receive. Direct RPC endpoints don’t offer this capability by default, meaning developers need to build their own caching mechanisms if they want similar efficiency gains - and some do, but again, it’s a matter of more resourcing and a more complicated stack. 

Load Balancing: Handling Resources Efficiently

Handling multiple requests on direct nodes requires manually distributing load across available resources. This can be cumbersome and lead to uneven distribution, where certain nodes are overburdened while others remain underutilized. Problems can follow quickly in a congested environment. 

Tatum Gateways come with intelligent load balancing built in. They distribute requests evenly across nodes, preventing any single node from becoming a bottleneck. This not only improves system reliability but also helps ensure that nodes scale efficiently as demand grows. By balancing load dynamically, gateways provide better resource utilization, reducing the risk of downtime or slow response times during traffic spikes.

So… to summarize, developers expect three things from their RPC infrastructure: reliability, speed, and scalability. Gateways deliver on all three fronts. Automatic failover mechanisms ensure uptime, even in the case of node failures. Optimized routing and caching systems deliver faster response times compared to direct node management. Intelligent load balancing lets you scale as traffic increases, without manual intervention. 

Case closed. It’s a fact.