-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RPC Gateway Fallback Resign] Implement the online path (#601)
Following the design https://www.notion.so/uniswaplabs/Redesign-RPC-Gateway-Fallback-7c2ea784ae554f81a6d488bc52fab5ae?pvs=4 and previous PR for offline path #583, we modify the online path to support auto fallback and recover based on DB states. A few highlights in this PR - Previous "health score" based calculation is totally removed. Online path will only publish metrics and listen to DB for provider health state updates - The auto fallback and recover is able to turn on/off at a per chain basis. This can help us to test it fully, for example, when deployed for a testnet with prod traffic - All UTs have been updated. All unused util classes has been removed Tested on local env: - Verified the offline path to be working: Auto update DB state based on alarm state - Verified the online path to be working: See a switch of provider selection after the preferred provider's DB state becomes unhealthy. Also see the reverse switch of provider selection when then provider's DB state resumes to healthy - This is observed using the new updated dashboards which shows DB state change and `SingleJsonProvider`'s state change history, as well as the number of selection of providers when serving RPC calls. An example of provider switch, showing switching from Nirvana to Infura when serving RPC requests after Nirvana becomes unhealthy.  Another example where we let the primary provider fail, then we see the traffic goes to the backup provider, then we let the primary provider recover, then the traffic goes back to the primary provider: 
- Loading branch information
1 parent
9d79d1c
commit 5a9396d
Showing
16 changed files
with
231 additions
and
1,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.