Logo
New RPC users get 35% off their first monthView the offer
RPC Assistant

Solana RPC Node: What It Is, How to Connect, and How to Choose

Summary

A Solana RPC node is a server that exposes the Solana JSON-RPC API, letting applications read chain data and submit transactions. This article explains how Solana RPC nodes work, how to connect to public and dedicated endpoints, and what to evaluate when choosing infrastructure for production apps.

Quick decision guide: which Solana RPC setup fits your app?

Before you dive into endpoints and methods, decide how you want to consume Solana data. The right choice depends on your workload, not on which option is most popular.

WorkloadRecommended setupWhy
Prototyping, hackathon, low trafficPublic RPC endpointFree, zero setup, fine for light reads
Production app with moderate trafficShared managed RPCReliable throughput without running nodes
High-throughput trading, indexing, heavy analyticsDedicated nodeIsolated capacity, consistent performance, custom tuning
Testing against a live-like environmentDevnet RPCFree testnet with SOL faucets for development

If you need predictable performance and your app depends on Solana RPC calls, a dedicated node gives you isolation from noisy neighbors. For most teams, starting with a managed shared RPC and upgrading to dedicated when you hit limits is a pragmatic path.

What is a Solana RPC node?

A Solana RPC node is a server that runs the Solana client software and exposes the JSON-RPC API. Applications use this API to query account balances, transaction status, block data, and to submit signed transactions. Unlike Ethereum's JSON-RPC, Solana uses its own JSON-RPC methods with different naming and response formats.

Solana's architecture is optimized for high throughput, with a proof-of-stake consensus and a central clock called Proof of History. RPC nodes are not validators; they serve data to clients and can be run in different configurations, such as archive nodes that store historical state.

Solana RPC endpoint: chain settings at a glance

When you connect to Solana, you need the correct network settings. Here are the key parameters for Solana mainnet and devnet.

SettingMainnetDevnet
Chain nameSolana MainnetSolana Devnet
Native currencySOL (9 decimals)SOL (9 decimals)
HTTP RPC URLhttps://solana.api.onfinality.io/publicSee Solana Devnet
WebSocket URLwss://solana.api.onfinality.io/public-wsSee Solana Devnet
Explorerhttps://explorer.solana.comhttps://explorer.solana.com

Note: The public endpoint is for testing and light usage. For production, consider a managed or dedicated RPC from a provider like OnFinality.

How to connect to a Solana RPC node

You can interact with Solana RPC using curl, JavaScript libraries like @solana/web3.js, or language-specific SDKs. Here's a basic curl example to get the latest block height:

curl https://solana.api.onfinality.io/public \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getBlockHeight"}'

Expected response:

{"jsonrpc":"2.0","result":123456789,"id":1}

For JavaScript, use @solana/web3.js:

import { Connection } from '@solana/web3.js';

const connection = new Connection('https://solana.api.onfinality.io/public');
const slot = await connection.getSlot();
console.log('Current slot:', slot);

For WebSocket subscriptions, connect to the WebSocket endpoint:

const wsConnection = new Connection('wss://solana.api.onfinality.io/public-ws');
wsConnection.onAccountChange(accountPublicKey, (accountInfo) => {
  console.log('Account changed:', accountInfo);
});

Solana RPC methods you'll use most

Solana's RPC API includes methods for reading accounts, transactions, and blocks. Here are common ones:

MethodPurpose
getBalanceGet SOL balance of an account
getAccountInfoGet account data and lamports
getTransactionFetch transaction details by signature
getBlockRetrieve block data
sendTransactionSubmit a signed transaction
getSignaturesForAddressList transaction signatures for an address
getLatestBlockhashGet the latest block hash for transaction signing

For a full list, see the Solana documentation.

Public vs. dedicated Solana RPC nodes

Public RPC endpoints are convenient but come with rate limits and can be unreliable under load. Dedicated nodes provide a private endpoint with dedicated resources, which is essential for production apps that need consistent performance.

FactorPublic RPCDedicated RPC
CostFreePaid
Rate limitsYesHigher or none
PerformanceShared, variableIsolated, predictable
ReliabilityDepends on providerHigher uptime potential
CustomizationNonePossible (e.g., archive, WebSocket)

OnFinality offers dedicated Solana nodes that you can deploy in minutes, with options for archive data and WebSocket support.

How to choose a Solana RPC provider

When evaluating RPC providers, consider these criteria:

  • Reliability: Look for providers with a track record of uptime, but verify with your own monitoring.
  • Performance: Test latency and throughput for your specific workload.
  • Rate limits: Understand the limits for free and paid tiers.
  • Support: Check if the provider offers dedicated support for production issues.
  • Network coverage: Ensure the provider supports the networks you need (mainnet, devnet, testnet).

For a deeper dive, see our guide to choosing an RPC provider.

Common pitfalls and troubleshooting

Here are typical issues developers face with Solana RPC nodes and how to resolve them:

SymptomLikely causeFix
429 Too Many RequestsRate limit exceededUpgrade to a paid plan or use a dedicated node
Timeout on sendTransactionNetwork congestion or invalid transactionCheck transaction fees and retry with a recent blockhash
WebSocket disconnectsIdle connection or provider limitImplement reconnection logic and heartbeat
Slot skippingNode is behindUse a provider with better sync or archive node

Key Takeaways

  • A Solana RPC node exposes the JSON-RPC API for reading data and sending transactions.
  • Public endpoints are fine for testing, but production apps need reliable, scalable infrastructure.
  • Evaluate providers based on performance, rate limits, and support.
  • OnFinality provides both shared and dedicated Solana RPC options, with HTTP and WebSocket support.

Frequently Asked Questions

What is the difference between a Solana RPC node and a validator?

A validator participates in consensus and produces blocks. An RPC node serves data to clients and does not participate in consensus. Some nodes can do both, but they are separate roles.

Can I run my own Solana RPC node?

Yes, you can run a Solana node using the official client. However, it requires significant hardware and maintenance. Managed services like OnFinality handle this for you.

What is an archive node?

An archive node stores the full historical state of the blockchain, allowing queries for historical account data. This is useful for analytics and indexing.

How do I get SOL for devnet?

You can use the devnet faucet to request SOL for testing. See the Solana Devnet page for details.

Does OnFinality support Solana WebSocket?

Yes, OnFinality provides WebSocket endpoints for Solana, as shown in the chain settings above.

For more details on pricing and networks, visit RPC pricing and supported RPC networks.

RPC Knowledge Base

Related RPC details

RPC Provider SelectionEfinity

Dedicated vs shared node access on Solana: how should you compare RPC providers?

Shared Solana RPC pools many callers onto the same endpoints, so throughput and priority depend on what everyone else is doing at that moment. Dedicat...

RPC Provider Selection

What are the key differences between dedicated and shared node access for blockchain applications?

Dedicated node access gives you exclusive use of a blockchain node, while shared node access means multiple users connect to the same endpoint. The ch...

Testnet RPCEthereumBase

Base Sepolia RPC Endpoint: Chain Settings, Faucet, and Debugging

Base Sepolia is a testnet for the Base L2 network, built on the OP Stack and using Sepolia ETH. This page provides the official RPC endpoints, chain c...

Network RPCMantle

Mantle Endpoint: Chain Settings, RPC URLs, and Debugging

Learn how to connect to Mantle mainnet with the correct chain ID, RPC endpoint, and explorer settings. This page covers public and dedicated RPC optio...

Troubleshooting

What does 'authentication failed: encrypted http response nonce mismatch' mean and how do I fix it?

The 'authentication failed: encrypted http response nonce mismatch' error is a TLS-layer replay protection failure. It occurs when the nonce value in ...

Network RPCKusamaAsset Hub

Asset Hub Kusama RPC Endpoint: How to Connect and Use It

Asset Hub Kusama (formerly Statemine) is a system parachain on Kusama for low-cost asset creation and transfers. This article provides the chain setti...

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started