Solana public RPC nodes are the fastest way to start building on Solana. They are free, require no sign-up, and let you send JSON-RPC requests to the network without running your own validator. But they are also shared, rate-limited, and not designed for production workloads. This guide explains how they work, their limitations, and when you should move to a managed or dedicated RPC provider.
Quick decision guide: public vs. managed vs. dedicated RPC
Before diving into the details, here is a quick way to decide which type of RPC endpoint fits your use case:
| Workload | Public RPC | Managed RPC | Dedicated RPC |
|---|---|---|---|
| Prototyping and hackathons | ✅ | ✅ | ✅ |
| Light dApp with low traffic | ✅ | ✅ | ✅ |
| Production dApp with real users | ❌ | ✅ | ✅ |
| High-throughput trading or indexing | ❌ | ❌ | ✅ |
Heavy getProgramAccounts or getSignaturesForAddress calls |
❌ | ✅ | ✅ |
| WebSocket subscriptions at scale | ❌ | ✅ | ✅ |
If you are just experimenting or building a demo, public RPC nodes are fine. If you are launching a production app, you should use a managed RPC provider like OnFinality to get reliable throughput and support. If you have sustained high load or need predictable performance, a dedicated node is the right choice.
What is a Solana public RPC node?
A Solana public RPC node is a server that exposes the Solana JSON-RPC API to anyone on the internet. It lets you query blockchain data (like account balances, transaction status, and block data) and submit transactions. Public nodes are operated by the Solana Foundation, community members, or infrastructure providers, and they are free to use.
When you send a request to a public RPC endpoint, you are sharing that node with many other developers. This is why public nodes have rate limits and can become slow or unavailable during peak usage.
How to use a Solana public RPC node
You can interact with a public RPC node using any HTTP client. Here is a simple curl example that gets the current slot:
curl https://solana.api.onfinality.io/public \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}'
You can also use the official Solana Web3.js library:
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 real-time updates, you can use WebSocket subscriptions:
import { Connection } from '@solana/web3.js';
const connection = new Connection('wss://solana.api.onfinality.io/public-ws');
const subscriptionId = connection.onSlotChange((slotInfo) => {
console.log('Slot changed:', slotInfo);
});
Limitations of public RPC nodes
Public RPC nodes are convenient, but they come with several limitations that can break your application in production:
-
Rate limits: Public nodes often limit the number of requests per second or per day. If you exceed the limit, you get
429 Too Many Requestserrors. - No SLA: There is no guarantee of uptime or performance. The node can go down or become slow without notice.
- Shared resources: Because many developers use the same node, a spike in traffic from one app can affect everyone else.
- Limited historical data: Public nodes typically do not provide full archive data. If you need historical state or logs, you may need an archive node.
- No support: If something goes wrong, you cannot contact anyone. You are on your own.
These limitations are why most production dApps use a managed RPC provider or a dedicated node.
When to upgrade to a managed RPC provider
If your dApp is ready for real users, you should move to a managed RPC provider. Managed providers like OnFinality offer:
- Higher rate limits: You get more requests per second, and you can scale up as your traffic grows.
- Reliability: Managed providers run multiple nodes behind a load balancer, so if one node fails, your traffic is routed to another.
- Support: You can contact the provider if you have issues.
- Additional features: Some providers offer archive data, WebSocket support, and analytics.
OnFinality provides a managed RPC service for Solana with both HTTP and WebSocket endpoints. You can see the full list of supported networks on our supported networks page.
When to use a dedicated Solana RPC node
A dedicated node gives you a private RPC endpoint that is not shared with anyone else. This is useful for:
- High-throughput applications: If you are running a trading bot, an indexer, or a data-heavy application, a dedicated node gives you consistent performance.
- Compliance or data privacy: If you need to control who accesses your node, a dedicated node is the right choice.
- Custom configuration: You can tune the node to your specific needs, such as enabling archive mode or adjusting the transaction processing settings.
OnFinality offers dedicated nodes for Solana. You can learn more on our dedicated node page.
How to evaluate a Solana RPC provider
When choosing a Solana RPC provider, consider the following criteria:
| Criterion | What to check | Why it matters |
|---|---|---|
| Rate limits | Requests per second, daily quota | Determines if your app can handle peak traffic |
| Uptime | Historical uptime, SLA | Ensures your app is available when users need it |
| Latency | Response time from different regions | Affects user experience, especially for real-time apps |
| WebSocket support | Does the provider offer WebSocket endpoints? | Needed for real-time subscriptions |
| Archive data | Does the provider offer archive nodes? | Needed for historical queries |
| Support | Is there a support team? | Helps you resolve issues quickly |
| Pricing | Cost per request or per month | Fits your budget |
You can compare providers using these criteria. OnFinality is a good option for many teams because it offers a balance of performance, reliability, and pricing. You can see our RPC pricing for details.
Common pitfalls and how to avoid them
Here are some common mistakes developers make when using Solana RPC nodes:
- Using a public node in production: This is the most common mistake. Public nodes are not reliable enough for production apps. Always use a managed or dedicated node.
-
Not handling rate limits: If you use a public node, you should handle
429errors gracefully. Implement retry logic with exponential backoff. - Ignoring WebSocket reconnection: WebSocket connections can drop. Make sure your app reconnects automatically.
- Not using the right endpoint for your use case: If you need real-time data, use WebSocket. If you need historical data, use an archive node.
Key Takeaways
- Solana public RPC nodes are free and easy to use, but they have rate limits and no reliability guarantees.
- Public nodes are fine for prototyping and light dApps, but production apps should use a managed RPC provider.
- Dedicated nodes are the best choice for high-throughput or data-intensive applications.
- When evaluating a provider, consider rate limits, uptime, latency, WebSocket support, archive data, support, and pricing.
- OnFinality offers managed and dedicated Solana RPC nodes with both HTTP and WebSocket endpoints.
Frequently Asked Questions
What is a Solana public RPC node?
A Solana public RPC node is a free, community-operated endpoint that exposes the Solana JSON-RPC API. It lets you query blockchain data and submit transactions without running your own node.
Are Solana public RPC nodes reliable?
Public RPC nodes are not reliable for production use. They have rate limits, no SLA, and can become slow or unavailable during peak usage. For production apps, use a managed or dedicated RPC provider.
How do I get a Solana RPC endpoint?
You can use a public endpoint like https://solana.api.onfinality.io/public for testing. For production, sign up for a managed RPC service or deploy a dedicated node.
What is the difference between a public and a private RPC node?
A public RPC node is shared by many users and has rate limits. A private RPC node (dedicated) is exclusive to you, offering better performance and reliability.
Does OnFinality support Solana?
Yes, OnFinality supports Solana mainnet and devnet. You can find more information on our Solana network page.
Related resources
Originally published at OnFinality.
Top comments (0)