Skip to main content

Multi-RPC Support

BozoBot features robust Multi-RPC support, allowing you to connect to multiple Solana RPC endpoints simultaneously. This enhances reliability, improves performance, and ensures your bot can continue operating even if some RPC providers experience issues.

Why Multi-RPC is Important

Reliability Improvements

  • Redundancy: If one RPC endpoint goes down or experiences issues, BozoBot automatically switches to another
  • Uptime Guarantee: Significantly reduces the chance of complete connection loss
  • Network Resilience: Protection against regional network outages or provider-specific problems

Performance Benefits

  • Load Balancing: BozoBot distributes requests across multiple endpoints
  • Reduced Latency: Ability to use the fastest responding endpoint for time-critical operations
  • Higher Throughput: More concurrent operations possible across multiple connections

Configuring Multi-RPC

Basic Setup

To configure multiple RPC endpoints, add them as a comma-separated list in your .env file:

RPC_ENDPOINTS=https://rpc1.example.com,https://rpc2.example.com,https://rpc3.example.com

WebSocket Configuration

For real-time data, configure your WebSocket endpoint:

RPC_WEBSOCKET_ENDPOINT=wss://ws.example.com

Ideally, this should correspond to one of your RPC endpoints.

GPA-RPC Configuration

For optimized GetProgramAccounts requests:

# Optional GPA-RPC ENDPOINTS:
GPA_ENDPOINTS=https://gpa1.example.com,https://gpa2.example.com

These specialized endpoints handle GPA requests more efficiently.

RPC Selection & Rotation

BozoBot intelligently manages your RPC connections:

  1. Health Checking: Continuously monitors the health and response time of each endpoint
  2. Automatic Failover: Switches to healthy endpoints when issues are detected
  3. Intelligent Routing: Sends different types of requests to the most appropriate endpoints
  4. Connection Recovery: Periodically retries previously failed endpoints to recover connections

BozoBot works with all standard Solana RPC providers. Here are some options:

Public (Free) RPC Endpoints

RPC_ENDPOINTS=https://solana-rpc.publicnode.com,https://api.mainnet-beta.solana.com

These free endpoints are suitable for testing but may have rate limits and lower reliability.

Private (Paid) RPC Services

For serious trading, we strongly recommend using premium RPC services for their reliability, speed, and higher rate limits:

  • Helius - Leading Solana-focused RPC provider with excellent reliability and performance. Offers dedicated nodes and special features optimized for traders.
  • Ankr - Multi-chain RPC provider with good Solana support and flexible pricing plans.
  • QuickNode - Enterprise-grade infrastructure with global distribution and high uptime.
  • Alchemy - Reliable provider with developer-friendly tools and good scaling options.
  • Triton - Specialized Solana RPC service with low latency options.

Example configuration with private endpoints:

RPC_ENDPOINTS=https://your-endpoint.helius.xyz/api/token,https://your-endpoint.quicknode.pro/your-token
tip

For trading bots, especially in copy-trading and sniping modes, premium RPC providers are essentially mandatory for reliable performance.

Optimizing Your RPC Setup

Usage Patterns

Different bot modes have different RPC requirements:

  • Sniffer Mode: Benefits from stable WebSocket connections
  • Copy Trading: Requires high throughput RPC endpoints, ideally with gRPC support
  • Liquidity Sniper: Needs low-latency connections for fast transaction execution

Performance Tuning

For optimal performance:

  1. Geographic Distribution: Use RPCs in different geographic regions for redundancy

  2. Provider Diversity: Mix different RPC providers to avoid single-provider outages

  3. Dedicated Endpoints: Consider having dedicated endpoints for different operations:

    # Regular operations
    RPC_ENDPOINTS=https://standard1.example.com,https://standard2.example.com

    # GetProgramAccounts operations
    GPA_ENDPOINTS=https://gpa-optimized.example.com

    # WebSocket operations
    RPC_WEBSOCKET_ENDPOINT=wss://websocket-optimized.example.com

Troubleshooting RPC Issues

Common Problems

  • Slow Responses: If you notice delayed operations, check your RPC latency
  • Failed Transactions: May indicate RPC endpoint congestion or failures
  • Error Messages: Watch for "Rate limit exceeded" or connection timeout errors

Solutions

  1. Add More Endpoints: Increase redundancy by adding more RPC endpoints
  2. Upgrade Providers: Consider moving to premium RPC services
  3. Check Logs: Monitor BozoBot logs for RPC-related warnings or errors
  4. Adjust Commitment Level: For better performance, you can adjust:
    COMMITMENT_LEVEL=confirmed
    Use "confirmed" for faster but slightly less certain confirmations, or "finalized" for complete certainty.

Advanced: gRPC Integration

For Copy Trading mode, BozoBot supports gRPC for faster blockchain data reading:

# Optional gRPC endpoint (for copy-trade)
GRPC_ENDPOINT=your-grpc-endpoint
GRPC_KEY=your-grpc-key

gRPC provides significantly lower latency than standard JSON-RPC, which is especially valuable for copy trading operations where speed is crucial.

Best Practices

  1. Always Use Multiple Endpoints: Even with premium providers, always configure at least 2-3 endpoints
  2. Test RPC Performance: Before serious trading, test the latency and reliability of your RPC setup
  3. Monitor Costs: Be aware of request limits and costs when using paid RPC services
  4. Regular Updates: Periodically review and update your RPC configuration as providers and your needs change