question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RPC Redundancy/Failover Configuration

See original GitHub issue

Is your feature request related to a problem? Please describe. Current RPC providers can have downtime, temporary connectivity issues, or rate limits that make clients transactions fail. Over the past year we have observed several windows of RPC failure, which could have been mitigated if near-api-js had configurations for multiple RPC providers.

Describe the solution you’d like Similar to issues #703 and #717, the core JSON RPC provider should be refactored to not only have retries, but allow for retries against multiple Providers. The default provider list can configure both near foundation and openshards RPC services. Provider list can be a single node string for backward compatibility OR an array of node strings. Up for discussion but needed: Create a failover threshold of retries for each provider, and a threshold for provider failures before defaulting to a different priority.

Configuration Example:

RPC_MAINNET_PROVIDERS="https://rpc.mainnet.near.org,[https://mainnet-rpc.openshards.io](https://mainnet-rpc.openshards.io)"

RPC_GUILDNET_PROVIDERS="https://guildnet-rpc.openshards.io,[https://rpc.guildnet.near.org](https://rpc.guildnet.near.org)"

NOTE: Because near-api-js is used in many dapps and repos, this functionality is very key toward providing the easiest way to allow clients to decentralize their RPC access. This is critical for community attacks against public resources.

Describe alternatives you’ve considered Users must create multiple instances of the Near module with different providers configured and detect TXN failures. Not idea at all.

Additional context There is an ongoing effort to create a decentralized RPC for mainnet & guildnet using many of the openshards.io nodes with a redundant load-balancer.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
volovykscommented, Nov 24, 2021
1reaction
TrevorJTClarkecommented, Dec 15, 2021

@frol @volovyk-s any movement on this? Another downtime/major latency issue on mainnet, with many apps unusable because of the dependency of a single RPC provider.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Presence Redundancy Groups - Cisco
Failover—Occurs in a presence redundancy group when one or more critical services ... Admin RPC Port—This parameter specifies the port that Cisco Server ......
Read more >
Configuring link redundancy | Using High Availability
In the configuration utility, on the Configuration tab, in the navigation pane, expand System and then click High Availability. On the Failover ...
Read more >
Cisco ASA Active-Standby Failover Configuration Example
In this post I will describe Active/Standby redundancy which is used much more frequently compared with the active/active scenario.
Read more >
Interface failover - OSIsoft Documentation
With interface failover, you configure redundant interfaces—that is, you configure interface software on two different computers to record ...
Read more >
Configuring the Redundancy Feature in a KIRK® Wireless ...
simple redundancy options, configuration and administration of a redundant ... address for the backup KIRK Wireless Server 6000, set the failover time, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found