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

RPC redundancy #1181

Closed
2 of 5 tasks
efstajas opened this issue Aug 20, 2024 · 1 comment · Fixed by drips-network/graphql-api#28
Closed
2 of 5 tasks

RPC redundancy #1181

efstajas opened this issue Aug 20, 2024 · 1 comment · Fixed by drips-network/graphql-api#28

Comments

@efstajas
Copy link
Contributor

efstajas commented Aug 20, 2024

The Drips App, Event Processor and API shouldn't go down if our main RPC provider, Infura, goes down. We should implement some RPC redundancy with a secondary RPC provider on a cheap plan with auto-scaling enabled.

The changes below are described for the app specifically, but similar logic should be put in place for Event Processor and API.

Outline:

  • Sign up for a paid account with an alternative provider (e.g. Alchemy), choose a low-tier plan, but enable auto-scaling in case the fallback goes into effect during a time of elevated traffic.
  • Create a generic RPC API endpoint that we direct all RPC traffic from the app to, e.g. /api/rpc.
  • Any RPC hitting the endpoint should first go to Infura. If Infura returns an error or times out (low timeout threshold), it should retry the same request with the backup RPC.
  • Return response of backup RPC or error for good if the backup is also faulty.

Important is that we should catch and forward RPC errors from main to Sentry, even if the backup saved the request, so that we get notified.

Status:

@bordumb
Copy link

bordumb commented Sep 9, 2024

Cross-posting here just so the idea isn't lost...

I saw the recent X/Twitter post that Drips was affected by Infura going down.

I've heard that some teams are using Grove as a fallback for issues like these.

Details below. Pretty good list of others using it.

https://www.grove.city/

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