Skip to content

feat(indexer_metrics_collector): exponential backoff retry for RPC he… - #374

Merged
godamongstmen897 merged 1 commit into
Goldii-locks:mainfrom
zakarimaureen1-blip:feature/issue-334-exponential-backoff-indexer-metrics
Aug 30, 2026
Merged

feat(indexer_metrics_collector): exponential backoff retry for RPC he…#374
godamongstmen897 merged 1 commit into
Goldii-locks:mainfrom
zakarimaureen1-blip:feature/issue-334-exponential-backoff-indexer-metrics

Conversation

@zakarimaureen1-blip

Copy link
Copy Markdown
Contributor

Summary

Closes #334. Implements an exponential backoff retry strategy within indexer_metrics_collector to gracefully handle transient RPC connection timeouts and network dropouts.

Changes Made

  • Exponential Backoff: Added doubling retry backoff logic up to maxRetries on RPC network timeouts and transient errors.
  • Metrics & Telemetry: Integrated failed attempts into IndexerMetricsFailureMonitor under the rpc_timeout failure type to work seamlessly with existing threshold alerting (Implement alerting notifications on indexer_metrics_collector failures #338) and diagnostics (Write polling diagnostics logs for indexer_metrics_collector #337).
  • Unit Testing: Created comprehensive test suite in __tests__/indexer-metrics-collector-rpc-retry.test.ts covering:
    • Immediate resolution on success without retries.
    • Proper backoff doubling intervals upon retryable failures.
    • Immediate pass-through on non-retryable errors.
    • Failure reporting on the monitor when retries are exhausted.

Verification

Executed local test suite; all 106 targeted tests passed successfully.

…alth checks

Add collectRpcHealthMetrics, which reuses rpc_poller_client's existing
withRetry exponential backoff helper to retry transient RPC connection
timeouts when fetching the latest ledger, instead of a bespoke retry loop.
Failures that exhaust retries are recorded on the shared failure monitor
as `rpc_timeout` so they surface through the existing threshold alerting.

Closes Goldii-locks#334
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@zakarimaureen1-blip Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@godamongstmen897
godamongstmen897 merged commit 5dafeb2 into Goldii-locks:main Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build exponential backoff retry strategies on indexer_metrics_collector

2 participants