Posts tagged #eth_subscribe

3 posts.

July 8, 2026 · 4 min read

WebSocket vs HTTP Polling for Blockchain Events

Should you poll eth_getLogs on a timer or subscribe over WebSocket? Polling is simpler and more robust; WebSocket is lower-latency and lighter at scale — but drops events on reconnect. Here's the honest trade-off, when each wins, and why production systems often use both.

Read →
June 18, 2026 · 5 min read

Subscribing to Contract Events with eth_subscribe (logs)

Polling eth_getLogs in a loop is the slow, brittle way to watch contract events. eth_subscribe pushes logs to you over WebSocket the instant they're mined. Here's how to build a subscription that filters correctly, survives reconnects, and never silently misses an event.

Read →
June 12, 2026 · 6 min read

How to Handle WebSocket Reconnections Without Losing Events

A WebSocket subscription that silently drops is worse than no subscription at all — you keep running, but events vanish into the gap. Here's how to build reconnect logic that detects the drop, backs off, re-subscribes, and backfills the missed events so your indexer never loses a log.

Read →