Retry Blockchain Node RPC Calls With Backoff and Circuit Breaking

Last updated: November 29, 2026

Quick Overview

Write a client wrapper for calls to blockchain node RPC endpoints that retries transient failures with capped exponential backoff and jitter, and stops calling a node that keeps failing via a circuit breaker.

Coinbase
Software Engineering Fundamentals
Software Engineer
Coinbase
November 29, 2026
Software Engineer
Technical Screen
Software Engineering Fundamentals
Medium

0

0

0 solved


Write a client wrapper for calls to blockchain node RPC endpoints that retries transient failures with capped exponential backoff and jitter, and stops calling a node that keeps failing via a circuit breaker.

Coinbase services call self-hosted and third-party nodes constantly, and naive retries can turn one slow node into a fleet-wide storm. The interviewer checks which errors are retryable, why jitter matters, why only idempotent calls are retried and how a breaker state machine works.

What the Interviewer Expects
  • Classify errors into transient and permanent
  • Use capped exponential backoff with full jitter
  • Retry only idempotent operations, and explain why broadcast is special
  • Implement closed, open and half-open breaker states
  • Make time and randomness injectable for tests
Key Topics to Cover
networking basics
retries
circuit breaker
resilience
testing
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • Is eth_sendRawTransaction safe to retry? Under what conditions?
  • How would you combine this with failover across several nodes?
  • How do retry budgets limit amplification across a call chain?
  • What metrics would you emit from this wrapper?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Wrap a function that performs an RPC. Retry on timeouts, connection resets and 429 or 5xx, up to N attempts. Do not retry on bad requests. Back off exponentially with a cap and jitter. After a thresho...

High-Level Design

The retry loop asks the breaker for permission before each attempt. A transient error records a failure, sleeps random() * min(cap, base * 2^attempt) (full jitter) and loops; success resets the brea...


Submit Your Answer
Markdown supported

Related Questions