RPC nodes: clients, sync modes, pruning, snapshots, and what an RPC actually costs

An RPC node is a database that rebuilds itself from a p2p network and answers queries whose cost varies a thousandfold. Health is height against an independent reference, not a 200 from the process.

Read the briefing
About 4 min to read 7 drills

What to remember

  1. Health means synced, peered and responsive — not 'the port answers'. A node that is up but behind returns confidently wrong answers, which is worse than an error.
  2. eth_syncing returns false when synced. An object means it is still catching up. Reading that backwards is a classic.
  3. Two processes, one JWT. Execution and consensus clients joined by the Engine API. A mismatched JWT secret is the usual 'will not sync'.
  4. eth_getLogs over wide ranges is not a cheap read. Method cost varies by orders of magnitude — rate limit by cost, and isolate heavy methods.
  5. An untested snapshot is not a backup. Time-to-rebuild-a-node is a number you should know and rehearse.

The big picture

An RPC node is a database that rebuilds itself from a peer-to-peer network and answers queries whose cost varies by three orders of magnitude. Operating one well means understanding the two-process client architecture, choosing a sync mode and a pruning policy deliberately, having a snapshot pipeline that actually restores, and knowing which JSON-RPC methods will take the node down.

The mental model

Think of it as three resources with different limits: disk (state growth and IOPS), CPU and memory (block execution and state caching), and the network (peers and gossip). Every operational question, sync mode, pruning, method limits, archive versus full, is a decision about which of those three you are spending.

In depth

Two clients, one node

Post-merge Ethereum nodes run two processes: an execution client (geth, reth, nethermind, besu) that executes transactions and serves eth_* JSON-RPC, and a consensus client (lighthouse, prysm, teku, nimbus) that follows the beacon chain. They talk over the Engine API on an authenticated port using a shared JWT secret; a missing or mismatched JWT is the single most common "my node will not sync" cause, and it shows up as authentication errors on 8551 rather than as a sync problem. Both clients must be fork-ready before a network upgrade, and their versions must be compatible.

Client diversity is not aesthetics: a bug in a supermajority client can split the network or, for validators, produce correlated failures. Other chains differ in shape (Solana runs one validator process that also serves RPC; Cosmos chains run a single binary with an ABCI app) but the operational questions, sync, pruning, snapshots, method cost, are the same.

Sync modes, pruning, and snapshots

Snap/checkpoint sync downloads recent state and headers and is measured in hours; full sync replays every block from genesis and is days to weeks; archive additionally keeps every historical state and costs multiple terabytes and far more IOPS. The right response to "we need an archive node" is "which calls need it?": most applications need recent state plus logs, and a small archive pool behind a method-routing proxy is cheaper than an archive fleet. Reth's static files and geth's path-based state scheme have changed these numbers repeatedly; quote ranges, not absolutes, and say when you last measured.

Pruning bounds state growth for full nodes. Snapshots, self-taken or from a trusted provider, turn a multi-day resync into an hour and are the difference between a lost node being an inconvenience and being an outage. A snapshot pipeline is only real if it is dated, automated, stored off the node, and restore-tested on a schedule; an untested snapshot is a backup in the worst sense of the word. Disk headroom must cover state growth plus the temporary space a restore or a compaction needs.

Method cost, consistency, and reorgs

JSON-RPC methods are not equal. eth_blockNumber, eth_getBalance, eth_call on recent state are cheap point reads. eth_getLogs over a wide block range, debug_traceTransaction, trace_block, and archive eth_call at old heights are expensive enough that a handful of concurrent requests can saturate a node's disk and CPU. That asymmetry is why production fleets weight requests by cost (compute units), rate limit per method, and route heavy methods to a separate pool.

Consistency: nodes in a fleet sit at slightly different heights, and the chain head is provisional, a reorg can remove a block you already served. Answers tagged latest are therefore "probably true"; safe and finalized tags exist for clients that need stability, and any client doing multi-call reads should pin a block number so its reads are internally consistent. A balancer must eject nodes that lag beyond a threshold, because a node that is up but behind returns confidently wrong answers, which is worse than an error.

Myths and facts

Myth: A node is healthy if the process is running and the port answers.

Fact: Health is sync status relative to the network head, peer count, and latency; a running node can be hours behind and still return 200s.

Myth: We need archive nodes for our application.

Fact: Usually only a few call patterns do. Route those to a small archive pool and keep the fleet on pruned full nodes.

Myth: Snap sync and full sync differ only in speed.

Fact: They differ in what history the node can serve; a snap-synced node has no old state and will fail archive queries.

Myth: eth_getLogs is a cheap read.

Fact: Over wide ranges it scans large amounts of data; unbounded ranges are the classic way clients take down a public endpoint.

Myth: If the node returns a block, that block is permanent.

Fact: Head blocks can be reorged away; use finalized/safe tags or wait for confirmations when correctness matters.

How pros do it

  • Run execution and consensus clients as separate managed services with a shared JWT, version-pinned and fork-ready ahead of upgrades.
  • Choose sync mode and pruning per role; keep archive capability scarce and route to it by method.
  • Automate snapshots off-host, date them, and restore-test on a schedule; measure time-to-rebuild-a-node.
  • Rate limit by method class and weight by cost; separate heavy methods onto their own pool.
  • Expose sync distance, peer count, and per-method latency as metrics; alert on lag against an independent reference.

Questions people ask

Do we need archive nodes, or are full nodes enough?

Answer with a question: which calls need old state? Logs, receipts and recent state come from pruned full nodes; only old-block eth_call, debug_trace* and balance-at-height need archive. Then propose a small archive pool behind method routing. Interviewers want the requirement narrowed before the hardware is sized.

How long does it take to rebuild a node?

Give the number and its source: from a snapshot, under an hour to a few hours; from snap sync, hours; from a full sync, days. Then say how often you test the restore. A rehearsed number lands very differently from a guessed one.

How do we serve consistent reads to an application?

Say three things: pin a block number for any sequence of reads, prefer finalized or safe for anything financial, and eject lagging nodes at the balancer so 'latest' is at least the same 'latest' across the fleet.

How much disk should we provision?

Current state size for the client and sync mode, plus growth over your retention horizon, plus temporary space for compaction or a restore; alert at 70% and have the rebuild path triggered before 90%. Quote your own measured figure with a date rather than a remembered one.

Do we need client diversity if we only run RPC nodes?

Less critical than for validators, but say why it still matters: a client bug takes out the whole fleet at once. Two execution clients across the fleet is cheap insurance, and it also gives you an independent height reference.

Why is the consensus client stuck on 'waiting for the execution client'?

Almost always the Engine API JWT: wrong path, wrong permissions, or the two clients pointed at different files. Say you would read the authenticated port's (8551) logs first, then check the flag each unit passes and the file mode.

Further reading

Drills · 7

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Pick the strongest answer

A product team comes to you asking for ten archive nodes because 'our indexer needs historical data'. How do you respond?

  1. Provision them; archive nodes are the standard for indexers. Ten archive nodes is a large, often unnecessary cost.
  2. Suggest snap sync on ten nodes, which gives the same data faster. Snap-synced nodes have no historical state; they cannot answer archive queries.
  3. Ask which calls need historical state: most indexing needs logs and receipts, which pruned full nodes serve, so a small archive pool behind method-based routing is usually enough and far cheaper. Archive is expensive in disk and IOPS; the requirement is usually narrower than stated.
  4. Tell them to use a third-party archive API instead. Maybe eventually, but the requirement still has not been established.
In short

First ask which calls need old state: logs and receipts come from pruned full nodes, so a small archive pool is usually enough.

Why

"Archive" is a specific need: historical state at old block heights (old eth_call, debug_trace*, some balance-at-block queries). Event logs and receipts are served by pruned full nodes. Establishing which methods and which block ranges is the whole conversation, and it usually shrinks the ask by an order of magnitude.

The common mistake

Treating 'historical data' as a synonym for 'archive node', or offering snap sync as a faster way to get the same history: a snap-synced node has no old state at all.

Read the docs

2 Answer out loud

Tell me how you would run a fleet of Ethereum RPC nodes so that losing one is boring: client choices, sync and pruning policy, snapshots, and the numbers you would hold yourself to. Five to seven sentences.

In short

A strong answer gives a measured time to rebuild a node from a restore-tested snapshot, not just a list of tools.

What a strong answer does
  • correctness: Client diversity across the fleet, per-role sync/pruning policy, small archive pool, automated dated snapshots stored off-host with restore tests, JWT and version management for forks, and health based on height/peers/latency.
  • operational numbers: Time-to-rebuild from snapshot, disk headroom thresholds, lag thresholds for ejection, and how often restores are tested.
  • judgment: Differentiates by method class and role, states cost tradeoffs, and plans for fork upgrades as a scheduled risk.
  • communication: Failure-first framing: what breaks, what makes it boring, and the number that proves it.
Why

Strong answers make node loss routine through automation, restore-tested snapshots with a stated rebuild time, role separation by method cost, and fork upgrades treated as a scheduled operation.

The common mistake

Listing tools and 'a load balancer with health checks' without ever saying what health means for a node or how long a rebuild takes. An untested snapshot is not a backup, and the interviewer will ask.

3 Pick the strongest answer

You have just brought up an Ethereum node. The consensus client keeps logging 'could not connect to execution client' and the execution client shows repeated authentication failures on port 8551. Where is the problem?

  1. The Engine API JWT secret does not match: the two clients are reading different files (or one lacks read permission), so every authenticated request is rejected. 8551 is the authenticated Engine API port; mismatched JWT is the classic cause.
  2. The consensus client version is too new for the chain. Version mismatch would log a fork or protocol error, not authentication failures.
  3. The execution client needs an archive database. Unrelated to authentication.
  4. The node has no peers yet, so it cannot sync. Peer problems appear as slow sync, not authentication failures between local processes.
In short

The two clients are not reading the same JWT secret file, so every Engine API request is rejected.

Why

Post-merge nodes are two processes joined by the Engine API with a shared JWT. Both must point at the same secret file with correct ownership. Check the path each unit passes, the file's mode, and whether one of them generated a new secret on start.

Read the docs

4 Read the output

The load balancer keeps this node in rotation and customers are reporting stale balances. What is wrong, and what should the health check have been?

$ curl -s -H 'content-type: application/json' localhost:8545 -d '{"jsonrpc":"2.0","id":1,"method":"eth_syncing","params":[]}' | jq .result
{
  "startingBlock": "0x1499a00",
  "currentBlock": "0x14a3b2c",
  "highestBlock": "0x14a4f10"
}
$ curl -s -H 'content-type: application/json' localhost:8545 -d '{"jsonrpc":"2.0","id":1,"method":"net_peerCount","params":[]}' | jq -r .result
0x3
$ curl -s -H 'content-type: application/json' localhost:8545 -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xab...","latest"]}' | jq -r .result
0x21f2f6f0f7a1c000
# load balancer health check: GET /health -> 200 (process is up)
  1. eth_syncing returning an object means the node is synced. An object means it is still syncing; false means synced.
  2. Peer count of 3 is normal; the issue is the balancer's timeout. Three peers is very low and consistent with falling behind; latency is not the symptom.
  3. The node is about 5,100 blocks behind (0x14a4f10 − 0x14a3b2c) with only 3 peers, but still answers 'latest' from its own stale head. The health check must compare the node's height against an independent reference and require a peer floor, ejecting on lag. A process-liveness check cannot detect the failure mode that matters for a node.
  4. The node is fine; eth_getBalance returned a value. It answered from a stale state; wrong answers are worse than errors.
In short

The node is about 5,100 blocks behind with only 3 peers, so the health check must compare its height to an outside reference and eject it.

Why

eth_syncing returns false when synced and an object with progress while syncing. Health for a chain node is: synced within N blocks of an independent reference, peers above a floor, and responsive. Otherwise a lagging node quietly serves stale reads with a 200.

The common mistake

Taking the returned balance as proof the node is fine; a lagging node answers 'latest' from its own stale head with a 200, which is worse than an error.

Read the docs

5 Find what's broken

This node sits behind a load balancer on a public endpoint. Which three lines would you fix before it takes traffic?

[Unit]
Description=execution client
After=network.target

[Service]
User=eth
ExecStart=/usr/local/bin/geth \
  --http --http.addr 0.0.0.0 --http.port 8545 \
  --http.api eth,net,web3,debug,txpool,admin \
  --http.vhosts=* \
  --authrpc.jwtsecret /etc/eth/jwt.hex \
  --datadir /var/lib/geth
Restart=on-failure
RestartSec=5
LimitNOFILE=8192

[Install]
WantedBy=multi-user.target
In short

Line 9 exposes admin and debug, line 8 binds RPC to every interface, and line 15 sets a file limit far too low.

What's broken
  • Line 9: The RPC namespaces include admin (peer and node administration) and debug (tracing); exposing them on a public HTTP endpoint allows node manipulation and trivially expensive queries.
  • Line 8: --http.addr 0.0.0.0 binds the RPC to every interface, so the node is reachable directly, bypassing the balancer, its rate limits, and its auth.
  • Line 15: LimitNOFILE=8192 is far too low for a node holding thousands of peer and client connections plus database files.
Why

--http.vhosts=* (line 10) is a real consideration but is usually paired with a proxy that sets Host; the flagged three are the ones that turn a node into an incident. Note that After=network.target (line 3) is weak but not what breaks this node under load.

Read the docs

6 Scenario: what do you do next?

At 14:00 your RPC fleet's p99 latency triples and two of six nodes fall behind head by 300+ blocks. Nothing was deployed. Traffic volume is flat, but one API key's request count is unchanged while its response bytes are 40× normal.

Step 1. Where do you start?

  1. Look at request composition per key and method, not just volume: a small number of wide eth_getLogs or trace calls can saturate disk and CPU while the request rate looks flat. Response-byte skew with flat request counts is the signature of expensive queries, not a traffic spike.
  2. Add three more nodes. New nodes join the same query pattern and also saturate; capacity is not the constraint.
  3. Blame the upstream network for reorgs. Nothing points at the chain; the skew is on one client key.
  4. Restart the two lagging nodes. Destroys evidence and returns them to the same saturating workload; they will fall behind again.

Step 2. One key is sending eth_getLogs over 2-million-block ranges in a loop. Mitigation, in order?

  1. Increase disk IOPS on all nodes. Expensive and slow, and the unbounded query pattern will still saturate whatever you provision.
  2. Apply a per-method block-range cap and a cost-weighted rate limit for that key immediately, route heavy methods to the separate archive/tracing pool, and let the lagging nodes catch up; contact the customer with the limits and a supported pagination pattern. Protects the shared fleet, isolates the expensive class, and gives the client a legitimate path.
  3. Ask the customer to stop and wait for them to comply. Hope is not a mitigation while other customers are affected.
  4. Block the key entirely. Heavier than needed; a range cap keeps them working within limits.

Step 3. Systemic follow-up?

  1. Move everything to a managed RPC provider. A large strategic change proposed as an incident fix; the same query would cost you money there.
  2. Document 'do not send wide getLogs' in the customer docs. Documentation without enforcement.
  3. Method-class routing with per-class pools, cost-unit accounting per key, documented range limits, health checks that eject on height lag, and dashboards of top talkers by cost rather than by request count. Turns the incident into structural protection and makes the next abusive pattern visible before it pages.
In short

First look at request cost per key and method: flat request counts with 40x more bytes means a few very expensive queries.

Why

The lesson interviewers want: request rate is the wrong unit for RPC. Cost-weighted accounting, method-class isolation, and health checks that understand height are the three mechanisms that keep a public endpoint alive.

Read the docs

7 Quick recall

How do the execution client and the consensus client authenticate to each other over the Engine API?

In short

A shared JWT secret file that both clients read.

Accepted

a JWT secret · JWT · jwt secret

Why

A shared JWT secret file; mismatched or unreadable JWT is the most common cause of a node that will not sync after setup.

Next lesson Validators: keys, slashing, client diversity, upgrades, and the availability/safety tradeoff
Drill · RPC nodes
0:00

Loading…