Logo

What is Solana RPC and how do you choose the right endpoint?

Key Takeaways

  • Solana RPC is the gateway for applications to read state, send transactions, and subscribe to updates on the Solana blockchain.
  • Public RPC endpoints (e.g., api.mainnet.solana.com) are free but rate-limited and unsuitable for production workloads.
  • Private RPC providers offer dedicated or shared nodes with higher rate limits, better reliability, and lower latency.
  • Key selection criteria include uptime guarantees, geographic distribution, support for WebSocket subscriptions, and pricing model.
  • Dedicated nodes provide isolated resources and predictable performance, while shared nodes are more cost-effective for lower traffic.
  • OnFinality provides Solana RPC endpoints with flexible plans and dedicated node options for production applications.
  • Always test endpoints with realistic load and monitor performance before committing to a provider.

What is Solana RPC?

Solana RPC (Remote Procedure Call) is a JSON-RPC 2.0 API that allows clients to communicate with the Solana blockchain. It provides methods for querying account balances, retrieving block data, sending transactions, and subscribing to real-time events via WebSocket. Every dApp, wallet, or bot that interacts with Solana relies on an RPC endpoint.

The Solana Foundation maintains public endpoints for each cluster (mainnet, devnet, testnet), but these are shared infrastructure with rate limits and no SLA. For production applications, a private RPC provider is essential to ensure reliability and performance.

  • HTTP methods: getAccountInfo, getBalance, sendTransaction, simulateTransaction, etc.
  • WebSocket methods: accountSubscribe, logsSubscribe, programSubscribe, etc.
  • State commitment levels: processed, confirmed, finalized.

Public vs Private Solana RPC Endpoints

Public endpoints like https://api.mainnet.solana.com are free and easy to use for development and testing. However, they impose strict rate limits (e.g., 100 requests per 10 seconds per IP) and offer no guarantees on uptime or latency. They are not suitable for production applications with real users.

Private RPC providers offer dedicated or shared nodes with higher rate limits, lower latency, and service-level agreements (SLAs). They often provide additional features such as archive data, WebSocket support, and geographic load balancing. Choosing a private provider is a standard practice for any serious Solana project.

  • Public endpoints: free, rate-limited, no SLA, best for prototyping.
  • Private endpoints: paid, scalable, reliable, with support and monitoring.
  • OnFinality offers both shared and dedicated Solana RPC nodes across multiple clusters.

Key Criteria for Choosing a Solana RPC Provider

When evaluating Solana RPC providers, consider the following factors to ensure your application's performance and reliability:

CriterionWhat to checkWhy it matters
Uptime SLALook for providers offering 99.9% or higher uptime guarantees.Downtime directly impacts user experience and can lead to lost transactions or revenue.
Rate LimitsUnderstand the maximum requests per second (RPS) allowed on each plan.Insufficient rate limits cause request throttling and application errors.
Geographic DistributionCheck if the provider has endpoints in multiple regions (e.g., US, EU, Asia).Closer endpoints reduce latency and improve transaction submission success rates.
WebSocket SupportEnsure the provider supports persistent WebSocket connections for real-time subscriptions.Many dApps rely on WebSocket for live updates on accounts, transactions, and programs.
Archive Data AccessDoes the provider offer historical state access beyond the current slot?Archive nodes are needed for analytics, backtesting, and certain dApp features.
Pricing ModelCompare pay-as-you-go, monthly subscriptions, and dedicated node pricing.Choose a model that aligns with your traffic patterns and budget.

Dedicated vs Shared Solana RPC Nodes

Shared nodes are cost-effective and sufficient for many applications. They pool resources across multiple users, which can lead to variable performance during peak usage. Dedicated nodes provide an isolated instance with guaranteed resources, consistent performance, and full control over configuration.

OnFinality offers both options. Shared nodes are ideal for development, testing, and low-to-medium traffic production apps. Dedicated nodes are recommended for high-throughput applications, trading bots, and any use case where predictable latency is critical.

  • Shared nodes: lower cost, resource contention, good for moderate traffic.
  • Dedicated nodes: higher cost, isolated performance, full customization.
  • OnFinality's dedicated Solana nodes come with monitoring and 24/7 support.

How to Test and Monitor Solana RPC Performance

Before committing to a provider, run benchmarks using tools like solana-bench or custom scripts. Measure latency for common methods (getBalance, getLatestBlockhash, sendTransaction) and test WebSocket subscription stability. Monitor uptime and response times over several days to identify any patterns.

After deployment, continue monitoring with application performance management (APM) tools. Set up alerts for high latency or error rates. Many providers, including OnFinality, offer dashboards and API metrics to help you track performance.

  • Use the Solana CLI to test endpoints: `solana balance --url <endpoint>`.
  • Simulate transaction load with custom scripts.
  • Check WebSocket reconnection behavior under network interruptions.

Getting Started with OnFinality Solana RPC

OnFinality provides reliable Solana RPC endpoints for mainnet, devnet, and testnet. With both shared and dedicated node options, you can scale from development to production seamlessly. All endpoints support HTTP and WebSocket, and dedicated nodes include full archive access.

To get started, sign up for an OnFinality account, create an API key, and choose your preferred Solana network. You can also explore the dedicated node option for maximum performance and control.

  • Instant API key generation.
  • Support for mainnet, devnet, and testnet.
  • Dedicated nodes with customizable configurations.
  • 24/7 technical support and monitoring.

Frequently Asked Questions

What is the difference between Solana RPC and Solana JSON-RPC?

Solana RPC and Solana JSON-RPC refer to the same thing: the JSON-RPC 2.0 API that allows clients to interact with the Solana blockchain. The terms are used interchangeably.

Can I use the public Solana RPC endpoint for production?

No, public endpoints (e.g., api.mainnet.solana.com) are rate-limited and have no SLA. They are intended for development and testing only. For production, use a private RPC provider like OnFinality.

What are the rate limits for Solana public RPC?

The public mainnet endpoint typically allows 100 requests per 10 seconds per IP. This is insufficient for most production applications.

Does OnFinality support Solana WebSocket subscriptions?

Yes, OnFinality Solana RPC endpoints support both HTTP and WebSocket methods, including accountSubscribe, logsSubscribe, and programSubscribe.

How do I choose between a shared and dedicated Solana RPC node?

Choose a shared node for lower cost and moderate traffic. Choose a dedicated node for guaranteed performance, high throughput, and full control. OnFinality offers both options.

solana rpc
RPC Knowledge Base

Related RPC details

Background

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