Skip to main content

Strategies for Subscribing to Solana Data

Updated on
Mar 11, 2025

Subscribing to data from the Solana blockchain is essential for building responsive applications that can react to on-chain events. This document outlines key approaches for accessing and processing Solana blockchain data efficiently, with recommendations for different use cases.

Jump to:

At a Glance

There are several approaches you can take to subscribe to Solana blockchain data, each optimized for different needs:

FeatureWebSocketsYellowstone gRPCQuickNode Streams
Best For• Simple Web dApps
• Development
• High Frequency Trading
• Low latency applications
• Data pipelines
• Analytics
SetupEasy - Native web3.jsModerate - Requires gRPCEasy - UI-based setup
ManagementSelf-managedSelf-managedFully-managed service
Language SupportAny language with
JSON-RPC
• TypeScript/JavaScript
• Python
• Rust
• Go
Node.js/JavaScript
LatencyLowLowestLow-Medium
Historical DataNoNoYes
Cost ModelFree Plans & up (billed
on response credits)
Starts at $499/mo
(10 credits/response)
Free Plans & up (billed
on filtered response size)
Key AdvantageSimplicityPerformanceManaged reliability & History
Dedicated OptionsLearn more about
Dedicated clusters
Contact us for Hybrid
Dedicated gRPC Nodes
n/a

Which Service Should I Choose?

When choosing between these solutions, consider the following key questions about your application's needs:

  1. Which data access patterns do you need?

    • For simple, direct updates on specific accounts → WebSockets
    • For high-performance, low-latency data access → Yellowstone gRPC
    • For managed data pipelines with multiple destinations → Streams
  2. Do you need historical data?

    • If historical data access is crucial → Streams offers built-in backfilling capabilities
  3. How much infrastructure do you want to manage?

    • For minimal infrastructure management → Streams handles everything for you
    • For direct control with moderate management → WebSockets are straightforward
    • For maximum performance with more setup → Yellowstone gives you direct access
  4. Where does your data need to go?

    • For multiple destinations or databases → Streams provides out-of-the-box integrations
    • For custom processing in your application → WebSockets or Yellowstone offer direct data access

WebSocket Subscriptions

WebSockets provide the most straightforward way to receive updates from the Solana blockchain. They maintain a persistent connection to a Solana node, allowing you to subscribe to specific events like account changes, program logs, or new blocks.

Key Features

  • Direct connection to Solana nodes using the JSON RPC API
  • Native support in Solana's web3.js and Solana Kit libraries
  • Lightweight solution for tracking specific accounts, programs, or transactions
  • Low setup complexity with minimal configuration required

Best Practices

  • Implement Reconnection Logic: WebSockets can disconnect, so implement robust reconnection to maintain seamless connectivity.
  • Monitor Subscription Health: Periodically check if subscriptions are still active.

When to Use WebSocket Subscriptions

WebSocket subscriptions are ideal for:

  • Simple applications monitoring specific accounts or programs
  • Development and testing environments
  • Web applications with straightforward real-time data needs
  • Projects with limited infrastructure management resources

WebSocket Resources

Yellowstone gRPC

Yellowstone leverages Solana's Geyser plugin system to provide enterprise-grade data access through gRPC - Google's high-performance remote procedure call framework. This approach offers extremely low-latency streaming of account updates, transactions, and blocks directly from validator nodes.

Key Features

  • Built on Solana's Geyser plugin system for direct validator access
  • Typed interface with highly efficient data transfer
  • Extremely low latency for time-sensitive applications
  • Advanced server-side filtering capabilities

Best Practices

  • Use Appropriate Filtering: Take advantage of Yellowstone's filtering capabilities to reduce data volume.
  • Monitor Connection Health: Implement proactive monitoring to detect and handle connection issues.

When to Use Yellowstone gRPC

Yellowstone gRPC is ideal for:

  • High-frequency trading systems requiring minimal latency
  • Enterprise applications requiring fine-grained control
  • Teams with existing gRPC infrastructure

Contact us for Hybrid Dedicated gRPC Nodes.

Yellowstone Resources

QuickNode Streams

Streams offers a managed solution that simplifies how you handle Solana's data flow. It processes and routes blockchain data to your chosen destination, including webhooks, S3-compatible storage, and databases like PostgreSQL and Snowflake.

Key Features

  • Managed data pipeline solution with multiple destination options
  • Built-in support for historical data backfilling
  • Fully customizable server-side filtering and transformation via Functions
  • Reliable delivery with automatic retries and guaranteed ordering

Best Practices

  • Use Functions for Filtering: Leverage QuickNode Functions to process data before it reaches your destination.
  • Configure Precise Filters: Set up precise filters to reduce data volume and costs.
  • Monitor Stream Health: Regularly check stream status and performance metrics to ensure stability and efficiency.

When to Use QuickNode Streams

QuickNode Streams is ideal for:

  • Teams wanting a managed data pipeline solution
  • Applications requiring historical data access
  • Projects sending data to multiple destinations
  • Services requiring reliable delivery and automatic retries

Streams Resources

Feedback

If you have any feedback or questions about this documentation, let us know. We'd love to hear from you!

Share this doc