graphprotocol / graphprotocol/indexer-rs
Readiness endpoint
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31
- Forks
- 29
- Avg merge
- 13h 9m
- Merged PRs (30d)
- 13
Description
Problem statement
When restarting the indexer it takes some time to load all the resources and to check all SG's. during this loading period the loadbalancer is sending traffic to the pod and those queries fail increasing the error rate.
I'd like to propose to create a /ready readiness endpoint which starts to respond with 200 http code only after everything was loaded and checked. This will allow the loadbalancer to know when to start sending traffic to the backend.
We could configure a delay for the traffic to be sent to the backends but that's a static configuration and sometimes it takes less / more time than usual so better is to have an endpoint that we could configure the loadbalancer to query to know when to send traffic
Expectation proposal
To have an endoint exposed by the indexer, like /readiness, which I can hit and get the readiness of the indexer to receive traffic so we can have the loadbalancer managing these backends without responding to the user with an error.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the indexer startup path where resources are loaded and security groups are checked, then find the HTTP entry point for adding an endpoint. Define readiness as unavailable during loading and returning HTTP 200 only after those checks complete; verify the behavior with the existing test setup if one covers HTTP endpoints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100