Skip to content

Commit e5ef4a1

Browse files
docs: Document block ingestor failover behavior
1 parent e889d4c commit e5ef4a1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/config.md

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

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

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

0 commit comments

Comments
 (0)