Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failover RPC support #107

Open
akolotov opened this issue Jun 18, 2018 · 0 comments
Open

Failover RPC support #107

akolotov opened this issue Jun 18, 2018 · 0 comments

Comments

@akolotov
Copy link
Contributor

akolotov commented Jun 18, 2018

At this moment it is possible to configure on one RPC url for each bridge direction:

home.rpc_host/home.rpc_port
foreign.rpc_host/foreign.rpc_port 

It means that if the remote node will not be accessible (e.g. the link is down or the node was shut down) the bridge will not be able to get events and send transactions by using the corresponding RPC channel.

In order to increase availability of the bridge opearations it is suggested to introduce two types of RCP URLs: primary RPC URL and failover RPC URL:

home.primary_rpc_host/home.primary_rpc_port
home.failover_rpc_host/home.failover_rpc_port
foreign.primary_rpc_host/foreign.primary_rpc_port
foreign.failover_rpc_host/foreign.failover_rpc_port 

In this case, the bridge should switch to failover RPC link if the primary RPC node is not accessible by primary RPC URL. As soon as the link is switched the corresponding log message should appear, e.g.

The primary RPC channel (<url is here>) is not accessible. Switching to the failover RPC channel (<url is here>)

If the failover RPC URL is not configured the bridge should crash as soon as the primary RPC channel is down.

If the failover RPC URL is down the primary RPC URL must be checked again and the bridge should switch to this channel.

If both channels are not available the bridge must crash with the corresponding log message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant