Skip to content

Commit a63adfa

Browse files
docs: Document block ingestor failover behavior
1 parent 3e57ad5 commit a63adfa

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

docs/config.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,33 @@ protocol = "near"
195195
provider = [ { label = "near", details = { type = "firehose", url = "https://..", key = "", features = ["compression", "filters"] } } ]
196196
```
197197

198+
### Block ingestor failover
199+
200+
When the block ingestor's `do_poll()` call fails (after all internal per-request retries are
201+
exhausted), `graph-node` automatically attempts to switch to a healthier provider. The logic
202+
is:
203+
204+
1. **Probe the current provider first.** `do_poll()` can fail for reasons unrelated to RPC
205+
availability (e.g. a database error or a chain reorg). If the current provider still
206+
responds to `eth_blockNumber`, the failure was not caused by the provider — no switch
207+
occurs.
208+
2. **Probe all alternatives in parallel.** If the current provider is unreachable, all other
209+
validated providers are probed simultaneously via `eth_blockNumber` to minimise wait time
210+
when providers are timing out.
211+
3. **Switch to the first reachable provider.** The first provider to respond successfully
212+
to the probe is selected as the new provider for the ingestor.
213+
The remaining probes are cancelled at this point.
214+
4. **If all providers are unreachable**, the ingestor stays on the current provider and
215+
re-probes on the next `do_poll()` failure.
216+
217+
There is no automatic return to the original provider. Once the ingestor switches, it stays on
218+
the new provider until that provider fails, at which point the same probe-and-switch logic
219+
applies.
220+
221+
Only validated providers are eligible as failover candidates. A provider in a temporary failure
222+
state (e.g. unreachable at startup, pending re-validation) is excluded until it passes
223+
validation again.
224+
198225
### Controlling the number of subgraphs using a provider
199226

200227
**This feature is experimental and might be removed in a future release**

0 commit comments

Comments
 (0)