Logo
RPC Assistant

What Are Solana Public RPC Endpoints and Should You Use Them?

Resumen

Solana public RPC endpoints are free, shared API gateways that allow developers to interact with the Solana blockchain without running their own node. They are ideal for prototyping, light dApp usage, and development. However, they come with rate limits and no SLA, so production applications often need a private or dedicated RPC provider like OnFinality for reliability and performance.

Solana public RPC endpoints provide a quick way to connect to the Solana network without running your own node. They are maintained by various providers, including the Solana Foundation and infrastructure services like OnFinality. While convenient for development and light usage, public RPCs have rate limits and no reliability expectations, making them unsuitable for high-traffic production applications.

Solana Public RPC Decision Checklist

Consider the following before relying on a public Solana RPC:

  1. Estimate your request volume — Public endpoints typically allow 100-500 requests per second per IP. If your dApp exceeds that, you need a private connection.
  2. Check required methods — Public RPCs usually support standard JSON-RPC methods but may block or rate-limit heavy queries like getProgramAccounts or getSignaturesForAddress.
  3. Assess latency sensitivity — Shared public nodes can suffer from noisy neighbors. If your application is latency-sensitive (e.g., trading bots, real-time games), dedicated nodes are better.
  4. Determine if archive data is needed — Public RPC nodes often run in non-archive mode, meaning historical data may be unavailable. For historical queries, you may need a provider with archive support.
  5. Evaluate failover strategy — Public endpoints can go down without warning. Always have a backup provider or a dedicated node with an SLA.

Available Solana Public RPC Endpoints

Below are common Solana public RPC endpoints. Note that their rate limits and feature sets may change; always check the provider’s documentation.

ProviderEndpoint (Mainnet)Rate Limit (approx.)Archive?WebSocket?
Solana Foundationhttps://api.mainnet-beta.solana.com100 req/10s per IPNoYes (wss://)
OnFinality (Public)https://solana.publicnode.com200 req/s per IPNoYes
Other ProvidersVariousVariesSome offerVaries

For a full list of endpoints and network details, see the Solana network page.

How to Connect to Solana Public RPC

You can test a public RPC endpoint using curl. For example, to get the latest block height:

curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSlot",
  "params": []
}'

Expected response:

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

In JavaScript using @solana/web3.js:

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

const connection = new Connection('https://api.mainnet-beta.solana.com', 'confirmed');
const slot = await connection.getSlot();
console.log(slot);

Public RPC Limitations

While public RPCs are great for quick experiments, they have significant drawbacks for production:

  • Rate limiting: Exceeding the request quota results in HTTP 429 errors or dropped connections.
  • No reliability expectations: Public endpoints can go offline without notice. No SLA exists.
  • No archive data: Most public nodes prune historical state. You cannot query past account balances or old transactions.
  • Limited WebSocket stability: WebSocket connections may drop or have throttling, impacting real-time applications.
  • No priority or dedicated resources: Your requests compete with everyone else's, causing variable latency.

When to Move to a Private or Dedicated Solana RPC Node

As your project grows, the limitations of public RPCs become critical. Consider upgrading when:

  • Your application sees more than 200 requests per second consistently.
  • You need access to historical data (archive node).
  • Your users rely on low-latency responses (e.g., trading, gaming).
  • You require a WebSocket connection that stays open for hours.
  • You want a reliability expectations and support.

Dedicated Solana nodes, like those offered by OnFinality, give you a single-tenant node with no resource contention, configurable rate limits, and access to archive and trace methods if needed. They also provide a WebSocket that can handle persistent connections. For details, visit the dedicated node page.

For a middle ground, OnFinality also offers a shared but still higher-tier RPC service with better limits and reliability. See the RPC pricing page for more.

Key Takeaways

  • Solana public RPC endpoints are free, easy to use, and sufficient for prototyping and small-scale usage.
  • They have rate limits, no SLAs, and limited features (no archive, possible WebSocket instability).
  • For production applications, evaluate your request volume, latency needs, and data requirements.
  • OnFinality provides both public and private Solana RPC options, including dedicated nodes for demanding workloads.
  • Always have a backup provider to ensure high availability.

Frequently Asked Questions

What is the difference between public and private RPC? Public RPCs are shared by many users, while private RPCs allocate resources specifically for your application. Private RPCs offer higher limits, better performance, and often include support.

Can I use a public RPC for my NFT minting dApp? Possibly, but public RPCs are prone to rate limiting and congestion. For high-traffic events like NFT mints, a dedicated Solana RPC node is strongly recommended to avoid failures.

Does OnFinality offer a free Solana public RPC? Yes, OnFinality provides a free public Solana RPC endpoint at https://solana.publicnode.com. It includes WebSocket support and is suitable for development. Upgrade to a paid plan for higher limits and reliability.

How do I switch from a public to a dedicated RPC? Simply replace the endpoint URL in your application code. You may also need to update authentication credentials if your provider uses API keys. OnFinality provides detailed documentation for migration.

What is archive mode and do I need it? Archive nodes retain the full historical state of the blockchain. If your dApp needs to query old account data or past transaction details, you need an archive RPC endpoint. Most public RPCs do not archive.

For more Solana network details, check the Solana network page. For pricing and plans, visit the RPC pricing page.

Base de conocimiento RPC

Detalles RPC relacionados

Nunca te preocupes por la infraestructura nuevamente

OnFinality elimina la carga pesada de DevOps para que puedas construir de forma más inteligente y rápida.

Comenzar