RPC latency explained: what it is and how to measure it
What RPC endpoint latency is made of, why percentiles and block freshness matter more than an average, how to measure it with curl, and how to reduce it.
In short
RPC latency is the time between your app sending a JSON-RPC request and receiving the answer. It is made of the network path to the endpoint, the time to set up a connection, any queueing at the provider's gateway and the work the node does to answer. Only part of it depends on the provider; much of it depends on where your app runs, how it connects and which methods it calls.
This guide breaks latency into its parts, explains why percentiles and block freshness matter more than an average, shows how to measure it yourself, and lists what reduces it.
What latency is made of
A single HTTPS request to an RPC endpoint goes through several steps:
- Name lookup. The endpoint's host name is resolved to an address.
- Connection setup. A TCP connection is opened, then a TLS handshake secures it. Both need round trips between your app and the endpoint.
- Request and network path. The request travels to the endpoint, and every hop adds time. Distance matters: a signal needs time to cross a continent or an ocean, and no software removes that.
- Gateway time. The provider authenticates the request, applies limits and picks a node.
- Node time. The node executes the method.
eth_blockNumberis a lookup;eth_callexecutes contract code;eth_getLogsover a wide range scans many blocks.1 - Response transfer. Large answers, such as a block with all its transactions, take longer to send.
Steps 1 and 2 happen only on a new connection. An app that reuses its connection pays them once, then only the remaining steps for every request.
Averages hide the slow requests
Latency is a distribution, not a number. Most requests are fast, a few are slow, and the slow ones are what users notice. That is why latency is reported in percentiles:
- p50 (median). Half of the requests are faster than this.
- p95. One request in twenty is slower than this.
- p99. One request in a hundred is slower than this.
An app that makes many RPC calls per page view or per block hits the slow tail on almost every page view or block, so p95 and p99 often decide how the app feels. Always compare the same percentile, for the same method, from the same place.
Fast is not enough: freshness
A fast answer from a node that is several blocks behind the chain is a fast wrong answer. Freshness, how close the node is to the newest block, matters as much as speed for anything that reads "latest" state.
Two effects are worth knowing:
- Block lag. Compare
eth_blockNumberfrom your endpoint with another source at the same moment. A node that is often behind will return outdated balances and miss recent events. - Jumping between nodes. Behind a load balancer, two requests can reach two nodes at slightly different heights, so "latest" can step backwards. Blockmetric RPC keeps your requests on one chain on the same node for 30 seconds to avoid that.2
How to measure it yourself
Measure from where your app actually runs, not from your laptop. curl reports the timing of each step with its write-out variables: name lookup, TCP connect, TLS handshake, first byte received and total time.3
curl -s -o /dev/null -X POST "$RPC_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}' \
-w "dns %{time_namelookup} tcp %{time_connect} tls %{time_appconnect} first byte %{time_starttransfer} total %{time_total}\n"A few rules make the numbers useful:
- Repeat the request many times and look at percentiles, not one run.
- Separate cold and warm. A single curl call opens a new connection every time; a real app usually reuses one.
- Test the methods you actually use.
eth_blockNumbermeasures the path;eth_callandeth_getLogsmeasure the node. - Check freshness alongside speed, by recording the block number each answer reports.
How to reduce latency
- Reuse connections. Keep-alive HTTP clients and long-lived WebSocket connections avoid repeated handshakes.
- Run close to the endpoint, and the endpoint close to the chain. A regional endpoint near your servers shortens the network path. For chains with a central sequencer or a validator set in one region, being near them shortens the path for new blocks too.
- Batch. Send several calls in one JSON array. Our gateway takes up to 100 calls per batch, each counted as one request.4
- Subscribe instead of polling. Over WebSocket,
eth_subscribewithnewHeadspushes each new block instead of asking for it repeatedly. - Cache what cannot change. A block that is final, a transaction receipt or a contract's code does not change; read it once.
- Keep heavy calls out of the hot path. Wide log scans and traces are slow by nature. Trace and debug RPC methods explains why.
The RPC best practices page shows batching, retries and log paging with code, and What is an RPC node? covers HTTPS against WebSocket.
Latency on Blockmetric RPC
Blockmetric RPC serves one global URL and regional hosts. Regions open one at a time when teams ask for them, and the RPC page lists the regions with notes on which chains each is close to, such as Tokyo for the Hyperliquid validators that run HyperCore and HyperEVM.5 Each region gets its own host, so an app can pin the region closest to it.
Blockmetric RPC is in early access: access, limits and price are agreed per team through the request form on the RPC page. We do not publish uptime or latency figures until we have measured them.2 Until then, the curl recipe above measures exactly what your app will see, from where it runs.
Common questions
What is a good RPC latency? It depends on distance and method. A light call from the same region usually takes far less than one from another continent. Compare p95 for the methods you use, from your own servers.
Why is my first request slow and the rest fast? The first request opens the connection and does the TLS handshake; later requests reuse it.
Is WebSocket faster than HTTPS? For a stream of updates, yes, because there is no repeated request and no polling interval. For one-off calls on a reused HTTPS connection, the difference is small.
Next steps
Live data
See today’s numbers
The live pages update continuously.
Free plan: every coin, up to 30 days of history. Compare plans
- API and data: all guides14 guides and the newest posts on the topic, with the live pages that answer it.
- Crypto market data APIThe same data as JSON: REST, live stream, webhooks
- API referenceEvery endpoint with parameters and examples
Sources
- ethereum.org, "JSON-RPC API" (accessed 2026-11-11)Back to text
- Blockmetric RPC docs (accessed 2026-11-11)Back to text
- curl manual, "-w, --write-out" (time_namelookup, time_connect, time_appconnect, time_starttransfer, time_total) (accessed 2026-11-11)Back to text
- Blockmetric RPC docs, "Best practices" (accessed 2026-11-11)Back to text
- Blockmetric RPC product page (accessed 2026-11-11)Back to text
How we collect and check the data: Data & methodology.
Share this guide as a link or as an image card with its title.