Compare Dedicated and Shared RPC Access for an Application
Check whether dedicated or shared RPC access fits your application by verifying endpoint behavior and reviewing the provider’s documented limits.
To choose between dedicated and shared RPC access, first check what each option includes, then compare the endpoints you can actually use. Send the same JSON-RPC request to each endpoint and confirm they report the expected chain ID. This checks basic connectivity and network identity; it does not measure performance or establish that an endpoint is suitable for your workload.
Compare what each access option provides
Shared access generally means an endpoint is used by multiple customers; dedicated access generally means resources or an endpoint are assigned to one customer. The exact meaning varies by provider, so verify what is dedicated, what limits apply, and whether the endpoint supports the RPC methods your application needs.
Compare the documented request or rate limits, supported methods, authentication requirements, network availability, and any stated isolation or capacity details. Do not infer that dedicated access is faster or that shared access will be slower without measurements for your workload.
- Use shared access when its documented limits and method coverage fit your application.
- Consider dedicated access when you need an explicitly assigned endpoint or documented isolation, and confirm those terms with the provider.
- Check the network and endpoint details on the relevant OnFinality network page.
Check both endpoints with the same JSON-RPC request
Set SHARED_RPC_URL and DEDICATED_RPC_URL to endpoint URLs supplied for the same network. Set EXPECTED_CHAIN_ID to that network’s chain ID. The example sends eth_chainId, rejects HTTP errors and JSON-RPC errors, and reports whether each endpoint returned the expected chain ID.
for name in SHARED DEDICATED; do
url_var="${name}_RPC_URL"
url="${!url_var:-}"
if [ -z "$url" ]; then
printf 'Missing %s\n' "$url_var" >&2
exit 1
fi
response=$(curl --silent --show-error --fail-with-body \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
"$url") || {
printf '%s endpoint request failed\n' "$name" >&2
exit 1
}
result=$(printf '%s' "$response" | jq -er '
if .error then error(.error.message)
elif (.result | type) == "string" then .result
else error("missing or invalid result") end
') || {
printf '%s endpoint returned an invalid JSON-RPC response\n' "$name" >&2
exit 1
}
if [ "$result" = "${EXPECTED_CHAIN_ID:?Set EXPECTED_CHAIN_ID}" ]; then
printf '%s: chain ID %s (matches expected)\n' "$name" "$result"
else
printf '%s: unexpected chain ID %s\n' "$name" "$result" >&2
exit 1
fi
doneExpected result: one SHARED: chain ID … (matches expected) line and one DEDICATED: chain ID … (matches expected) line. The chain ID values come from your endpoints; this guide does not assume or supply them.
The command requires curl and jq. It exits on missing variables, a failed HTTP request, a JSON-RPC error, an invalid response, or a chain ID mismatch. If the check fails, verify the endpoint URL, credentials, network, and provider’s access requirements.
Use RPC checks for RPC decisions
A matching chain ID confirms that an endpoint responds for the expected network. To compare behavior under your own workload, send representative requests to both options over a defined period, record response times and errors, and keep request volume within each option’s documented limits. Treat those results as measurements of your setup, not universal performance claims.
RPC access lets an application call a blockchain node. Indexing and querying are separate tasks: an indexer processes chain data into a queryable store, and an application can query that indexed data through a separate API. An RPC endpoint alone does not provide indexed query results.
For a next step, review OnFinality’s Learn resources and the RPC Assistant for network and RPC access information.