ByAUJay
Summary: In 2025, “high availability” for Web3 APIs means architecting for chain upgrades (Dencun, Pectra), L2 sequencer quirks, provider-specific limits, and real-time streaming at scale. This guide distills what actually works in production—method-aware load balancing, reorg-safe caching, resilient transaction submission, and observability you can act on.
Designing High-Availability Web3 API Clusters for Mission-Critical Apps
Decision-makers increasingly ask us the same question: how do we guarantee reliability for wallets, exchanges, AI agents, and enterprise apps that depend on Web3 APIs—without overspending? The answer in late 2025 is not just “more nodes.” It’s an architecture that absorbs protocol change (Ethereum’s Dencun and Pectra), L2 behaviors, provider differences, and streaming workloads.
Below is a concrete blueprint based on what we’ve shipped and operated across chains and clouds this year.
1) Why “HA” is different in 2025
- Ethereum’s Dencun added blob transactions (EIP‑4844). Blobs live ~18 days on consensus clients, so your data access and indexing behavior must handle ephemeral DA and new fields (e.g., baseFeePerBlobGas in fee history). Dencun activated Mar 13, 2024, 13:55 UTC. (ethereum.org)
- The Pectra hard fork (May 7, 2025) introduced EIP‑7702 (programmable EOAs) and increased blob throughput via EIP‑7691 (target 6, max 9 blobs per block). If your API layer inspects transactions/receipts or fee markets, expect changed distributions and higher L2 batch cadence. (coindesk.com)
- L2s are reliable but not infallible. OP Stack and Arbitrum provide “force inclusion” when sequencers are down—but with 12–24 hour windows that change how you build RTO/RPO. Design for degraded service, not just failover. (docs.optimism.io)
- Non‑EVM chains have different failure modes. Solana suffered a 5‑hour outage on Feb 6, 2024; design cross‑RPC redundancy and commit‑level reads (“finalized”) for state reads. (theblock.co)
2) Set explicit SLOs (and negotiate SLAs)
- Define SLOs per method class:
- Read: p95 latency and success rate per method (eth_call, eth_getLogs, getProgramAccounts, etc.).
- Write: submission success within N blocks, duplicate‑safe resubmission rate, and time‑to‑finality acknowledgement.
- Providers’ SLAs: examples
- Chainstack publicly commits to 99.9% quarterly uptime and credits; they also document incident windows and response SLAs. Use this to benchmark others. (chainstack.com)
- Infura’s status history shows variance by surface (e.g., HTTPS JSON‑RPC vs WS). Monitor provider‑specific uptime, not just a marketing SLA. (status.infura.io)
- Some providers claim 99.99%+ and multi‑billion daily calls—validate with your telemetry, not just claims. (chainstack.com)
Tip: tie credits to measurable business impact (e.g., missed trade windows), not only minutes of downtime.
3) Method‑aware, multi‑provider routing
Static round‑robin is not enough. Route by method, chain, and payload weight.
- Split traffic by method class:
- Heavy scans (eth_getLogs, debug/trace) to providers with generous ranges and result caps; live reads (eth_call, eth_getBalance) to low‑latency pools; write paths to providers with strong TX propagation. Alchemy, Chainstack, TheRPC, Dwellir and others publish explicit eth_getLogs limits—bake them into the router. (alchemy.com)
- Paginate eth_getLogs by block ranges that won’t hit caps (e.g., 2k–10k depending on chain/plan) and respect result size limits (typical 10k logs or ~150MB). Your router should automatically chunk and parallelize. (alchemy.com)
- Prefer eth_getBlockReceipts for indexers (1 call per block vs N receipts). It’s now supported by major providers and clients; fall back only where unavailable. (quicknode.com)
- For subscriptions:
- newHeads/logs via WS with sticky sessions; many “pending tx” streams reflect only the provider’s own mempool (e.g., Alchemy). Design your expectations (and dedup) accordingly. (alchemy.com)
Concrete LB patterns
- Use Envoy/HAProxy in front of provider pools:
- Health checks per method (HTTP 200, JSON‑RPC result validation).
- Outlier detection and ejection on 5xx/timeouts; conservative max_ejection_percent to avoid full pool blackouts. (envoyproxy.io)
- Retry policy with per‑try timeouts (e.g., 500–800ms) and hedged requests on tail latency spikes (hedge_on_per_try_timeout=true). (kgateway.dev)
- WebSockets:
- ALB supports WebSockets natively; tune idle timeouts for long‑lived subs. If you need TCP pass‑through or QUIC, consider NLB with configurable idle timeouts and QUIC passthrough. Cloudflare supports proxied WebSockets and recently increased WS message limits for Workers. (docs.aws.amazon.com)
4) Reorg‑safe caching and consistency
- Cache immutable results by block hash; for tags like latest, safe, finalized, choose TTLs by your risk tolerance:
- latest: short TTL and reorg-aware invalidation.
- safe/finalized: heavier caching (finality ≈ two epochs ~12–15 minutes today). Expose a “consistency tier” header to callers. (ethereum.org)
- For fee estimation, rely on eth_feeHistory (optionally with percentiles) instead of static tips, and incorporate blob fee fields post‑Dencun/Pectra. (quicknode.com)
5) Transaction submission that doesn’t lose money
- Idempotent resubmission: resend the same signed TX hash to multiple providers only if you confirm it’s not already in mempool; handle “already known/underpriced” (-32000 variants) gracefully. Map JSON‑RPC error codes to retry vs. fail. (docs.blockvision.org)
- Gas policy:
- Use eth_feeHistory percentiles for maxPriorityFeePerGas; never hardcode. Consider provider hints for max tip edges. (chainnodes.org)
- Private orderflow for sensitive txs:
- Flashbots Protect RPC hides txs from the public mempool, enforces non‑0 tips, and recently updated rate limits and deprecations; integrate “fast” multiplexing mode when landing speed matters. (docs.flashbots.net)
- Monitor mempool placement:
- On self‑hosted clients, enable txpool_content/status (Geth/Nethermind/Reth) to verify nonce gaps and replacement policy quality. (geth.world)
Example: provider‑aware send strategy (pseudocode)
send(rawTx): feePolicy = feeHistoryPolicy(chain) signed = applyFeePolicy(rawTx, feePolicy) for attempt in [0..N]: for provider in writePool.prioritized(): res = provider.eth_sendRawTransaction(signed) if res.ok: return res.hash if res.error in [ALREADY_KNOWN, REPLACEMENT_UNDERPRICED]: continue if res.error in [RATE_LIMIT, GATEWAY_TIMEOUT]: backoff.exponentialJitter() maybeSwitchToPrivateRPCIfSensitive() throw FatalSubmissionError
6) L2 specifics you must design for
- OP Stack forced‑tx window (sequencer downtime): deposits can be forced via L1; timing nuances across <30m, 30m–12h, and >12h require explicit app copy changes (UX banners, delayed settlement modes). Build toggles to reduce functionality when in “forced‑inclusion only.” (docs.optimism.io)
- Arbitrum delayed inbox: users can bypass sequencer after ~24h; expose a “delayed path” in admin tooling and document the cost/latency tradeoffs. (docs.arbitrum.io)
- Post‑Pectra blobspace: higher throughput (EIP‑7691) means L2 batchers will alter posting cadence and fees; pre‑warm caches and increase subscription fan‑out capacity on upgrade days. (eips.ethereum.org)
7) Solana and non‑EVM: different weight classes, different limits
- Respect Solana method‑specific limits (getProgramAccounts has very low recommended RPS with strict filters and dataSlice). Use “finalized” commitment for balances/positions that drive money. (docs.chainstack.com)
- Engineer for rare, but material, outages:
- Multi‑RPC rotation, commitment downgrades (finalized → confirmed) if leader churn causes lag, and backpressure when getProgramAccounts stalls. Solana’s Feb 2024 outage is a reminder to build degraded modes. (theblock.co)
8) Security, networking, and zero‑trust perimeters
- Do not expose raw client RPC ports; terminate TLS at a gateway and enforce JWT/API key + mTLS between tiers. If you front with ALB, you can now offload JWT verification on the balancer for service‑to‑service auth. (aws.amazon.com)
- Tune long‑lived connections: WebSockets across Cloudflare/AWS require correct idle timeouts and WS headers; failing to tune leads to ghost disconnects under load. (developers.cloudflare.com)
- Configuration risks matter as much as code: ALB/WAF misconfigurations have been shown to enable auth bypass in real deployments—treat infra as code, add policy tests. (wired.com)
9) Observability you can act on (OpenTelemetry)
Instrument the API gateway with OpenTelemetry’s JSON‑RPC semantic conventions:
- Required attributes: rpc.system=jsonrpc, rpc.method, rpc.jsonrpc.version, and if errors occur, rpc.jsonrpc.error_code/message. This lets you chart p95 per method, per provider, and alert on error code clusters (e.g., -32005 rate limit vs -32603 internal). (opentelemetry.opendocs.io)
Key golden signals to expose:
- Read path: p95 latency by method, result size, cache hit ratio by block tag (latest/safe/finalized).
- Write path: inclusion time histogram (submit → in‑block), replacement/bump rate, revert rate by route (public vs private RPC).
- Streaming: WS subscription count per shard, reconnect rate, duplicate event ratio on reorgs.
10) Reference architecture (battle‑tested)
- Global anycast DNS → Cloud CDN (optional for static assets) → API Gateway (Envoy/HAProxy) with:
- Method‑aware routing tables per chain (HTTP and WS clusters).
- Circuit breakers (max concurrent, pending requests), outlier detection, per‑try timeouts, hedging. (envoyproxy.io)
- Pools:
- Read‑pool A: low‑latency providers; Read‑pool B: heavy‑scan providers (higher result caps).
- Write‑pool: 2–3 diverse providers + private orderflow RPC (Flashbots Protect) for sensitive txs. (docs.flashbots.net)
- Caching:
- L1: in‑process response cache keyed on method+params; immutability by block hash.
- L2: Redis cluster with tag‑aware TTL (latest vs finalized).
- State and indexing:
- Log indexer uses eth_getBlockReceipts first; if unsupported, log‑paged eth_getLogs with 2k–5k block windows.
- WS:
- Sticky sessions at LB, auto‑reconnect with resubscribe and backfill from last seen block.
- Security:
- JWT at edge (ALB or gateway), mTLS to egress proxies, WAF rules for method allowlist.
- Ops:
- OTel traces to a TSDB for p95/p99 dashboards; SLO burn alerts per method (“error budget on eth_getLogs”).
11) Practical “gotchas” we see weekly—and how to fix them
- “We cache latest aggressively, and users see weird rollbacks.”
- Fix: split latest/safe/finalized caches; default user reads to safe unless they explicitly need latest. (ethereum.org)
- “Pending tx stream misses some mempool activity.”
- Providers often stream only their mempool; use multiple WS providers or rely on newHeads + receipts to infer activity, not pending alone. (alchemy.com)
- “getLogs keeps timing out.”
- Adopt provider‑specific windowing and result caps (e.g., 2k blocks, 10k logs), shard by address/topics, and parallelize with backoff. (alchemy.com)
- “Gas estimation spikes on upgrade days.”
- Use eth_feeHistory percentiles and watch blob fee signals post‑Dencun/Pectra; lower cache TTLs during forks. (quicknode.com)
- “WS drops every few minutes.”
- Check idle timeouts (NLB/ALB/Cloudflare), enable keep‑alives/pings client‑side, and confirm stickiness. (aws.amazon.com)
12) Budgeting for reliability
- Spend where it pays:
- One premium provider for heavy methods + one low‑latency for reads + one private orderflow RPC typically beats “all‑in one” for both cost and risk.
- Move indexers to receipts‑first pipelines to cut 60–80% of log‑scan calls in busy blocks. (quicknode.com)
- Offload auth and coarse‑grained rate limits to the load balancer; keep method‑aware limits in the gateway.
- Pre‑allocate headroom during forks (Dencun/Pectra days saw short‑term spikes in blob activity and fee volatility). (galaxy.com)
Implementation checklist
- Provider mix chosen per chain and method class (with published limits captured in code). (alchemy.com)
- Envoy/HAProxy configured with:
- health checks, per‑try timeouts, hedging, outlier detection. (envoyproxy.io)
- WS edges tuned:
- ALB/NLB/Cloudflare timeouts and stickiness verified pre‑launch. (docs.aws.amazon.com)
- Reorg‑safe caching policy:
- separate caches for latest/safe/finalized, block‑hash keyed immutables. (ethereum.org)
- Write path:
- idempotent resubmission, error‑code mapping, feeHistory percentiles, optional Protect RPC route. (docs.flashbots.net)
- L2 readiness:
- force‑inclusion playbooks, degraded‑mode UX, monitoring for sequencer incidents. (docs.optimism.io)
- OTel instrumentation:
- rpc.system=jsonrpc, rpc.method, rpc.jsonrpc.version, error_code/message; SLO dashboards built. (opentelemetry.opendocs.io)
High‑availability Web3 in 2025 is a discipline: know the method semantics, the provider limits, and the protocol’s evolving rules of the game. If you design for that reality—method‑aware routing, reorg‑safe caches, resilient transaction submission, and telemetry that tells you where to act—you will achieve the reliability your business expects without overspending.
7Block Labs can help you turn this blueprint into a runway-ready deployment and tailor it to your exact chain mix, latency targets, and compliance constraints.
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

