Security Guide

Solana RPC Security Hardening Guide

How to Protect RPC Infrastructure from Abuse, Downtime, and Exploitation

Why RPC Security Matters More Than Validator Security

Most operators focus on securing validators.

That's a mistake.

RPC nodes are:

  • publicly exposed
  • heavily queried
  • directly tied to application uptime
  • easier to attack

A compromised or overloaded RPC node doesn't just go down — it:

  • breaks wallets
  • stalls dApps
  • causes transaction failures
  • destroys user trust
In practice, RPC failures cause more real-world damage than validator downtime.

This guide covers how serious operators harden RPC infrastructure in production.

Threat Model: What You're Actually Defending Against

Before applying controls, understand the real threats.

1. Traffic Abuse (Most Common)

  • uncontrolled API usage
  • bot scraping
  • bursty request floods
  • wallet retry storms

2. Resource Exhaustion

  • RAM saturation
  • disk IO starvation
  • CPU spikes from expensive RPC calls

3. RPC Method Abuse

  • getProgramAccounts
  • getSignaturesForAddress
  • large range queries
  • websocket subscription spam

4. Network-Level Attacks

  • DDoS
  • SYN floods
  • connection exhaustion

5. Configuration Leaks

  • open admin endpoints
  • unrestricted RPC methods
  • weak firewall rules

Core Principle of RPC Security

You do not "secure" RPC nodes by hiding them.
You secure them by controlling access and cost per request.

Every request must be:

  • intentional
  • rate-limited
  • observable
  • expendable

Layered Security Architecture (Recommended)

A hardened Solana RPC stack looks like this:

Internet → Edge (Cloudflare / CDN / WAF)
Reverse Proxy (Nginx / HAProxy)
RPC Node Cluster
Monitoring & Alerting

Each layer solves a different problem.

Layer 1: Network & Firewall Hardening

1 Restrict Open Ports

Only expose:

  • 80 / 443 (HTTP / HTTPS)
  • custom RPC ports only internally

Block everything else.

2 Geo & ASN Filtering (Optional)

If your users are regional:

  • block irrelevant regions
  • block known abusive ASNs

This reduces attack surface instantly.

Layer 2: Reverse Proxy (Non-Optional)

! Never Expose Solana RPC Directly to the Internet

Use Nginx or HAProxy as a mandatory control plane.

What the proxy gives you:

  • rate limiting
  • request filtering
  • connection caps
  • header inspection
  • method blocking

Without this, you're naked.

Rate Limiting (The Most Important Control)

Global Rate Limits

Limit requests per IP:

  • e.g. 50–200 req/sec depending on use case

This prevents:

  • scrapers
  • abusive wallets
  • runaway clients

3 Endpoint-Specific Limits

Some RPC calls are expensive. Limit aggressively:

  • getProgramAccounts
  • getTokenAccountsByOwner
  • historical queries

These endpoints are frequent attack vectors.

4 Connection Limits

Set hard caps on:

  • concurrent connections
  • websocket subscriptions

WebSocket abuse is one of the fastest ways to kill RPC nodes.

Example:

  • max connections per IP
  • max subscriptions per key

Layer 3: Authentication & API Keys

5 Require Authentication for Non-Public RPC

If RPC is not public, do not allow anonymous access.

Use:

  • API keys
  • JWT tokens
  • signed headers

Tie:

  • rate limits
  • quotas
  • monitoring

to keys, not IPs.

This allows:

  • user-level throttling
  • abuse isolation
  • paid tier enforcement

Layer 4: RPC Method Restrictions

6 Disable What You Don't Need

Many deployments allow every method by default.

That's unnecessary.

Restrict:

  • historical queries
  • archive data
  • full account scans

Expose only what your application requires.

Layer 5: Resource Isolation

! Separate RPC from Validators

Never combine roles.

RPC load will:

  • starve validator resources
  • cause missed votes
  • increase skipped slots

7 Separate Public vs Private RPC

Public RPC:

  • aggressive limits
  • heavy caching

Internal RPC:

  • trusted clients
  • higher throughput

8 Disk & Snapshot Protection

RPC nodes are disk-heavy. Protect against:

  • snapshot replay overload
  • ledger growth issues

Best practices:

  • fast NVMe only
  • no shared disks
  • snapshot pruning
  • archive separation

Slow disks = security risk via resource exhaustion.

9 Memory Hardening

RPC nodes need far more RAM than validators.

Under-provisioned RAM leads to:

  • OOM kills
  • process crashes
  • cascading failures

Rules of thumb:

  • monitor resident memory
  • keep headroom
  • alert early

Memory exhaustion is silent until it's catastrophic.

10 WebSocket Security

WebSockets are powerful — and dangerous.

Controls:

  • subscription caps
  • idle timeouts
  • heartbeat checks
  • per-IP connection limits

Never allow unlimited subscriptions.

Layer 6: Caching Strategy (Security by Cost Reduction)

11 Caching Is a Security Tool

Caching is a security tool, not just performance.

Cache:

  • common read calls
  • repeated queries
  • popular account lookups

This:

  • reduces backend load
  • absorbs spikes
  • limits attack impact

Redis or in-memory caches are common.

Monitoring & Alerting (You Can't Secure What You Can't See)

12 Track Everything

Track:

  • request volume
  • error rates
  • latency percentiles
  • memory usage
  • disk IO
  • connection counts

Alert on:

  • sudden spikes
  • sustained increases
  • abnormal query patterns

Security incidents usually look like "traffic anomalies" first.

Common RPC Security Failures (Real-World)

Failure 1: Public RPC with No Limits

No rate limiting, no proxy, wide open.

Result: downtime during spikes, wallet failures, angry users

Failure 2: Validator + RPC Combined

Running both roles on same machine.

Result: validator penalties, vote delays, lost rewards

Failure 3: No Proxy Layer

Direct exposure to internet.

Result: zero control, impossible mitigation during attacks

Self-Hosted vs Managed RPC (Security Tradeoff)

Managed RPC

Pros:

  • built-in protections
  • no infra ops

Cons:

  • shared risk
  • opaque limits
  • limited control

Why Bare Metal Helps Security

Bare metal provides:

  • predictable performance
  • no noisy neighbors
  • stable latency
  • easier capacity planning

This makes:

  • rate limits accurate
  • alerts meaningful
  • attack mitigation reliable

Virtualized cloud often hides problems until it's too late.

Deploy Secure RPC on Cherry Servers

  • CPU: AMD EPYC 7003 Series
  • RAM: 256GB – 512GB
  • Storage: Dual Gen4 NVMe
  • Network: 10Gbps unmetered
View Cherry Servers Inventory →

Security Checklist (Quick Reference)

Before exposing an RPC endpoint, confirm:

  • Reverse proxy in place
  • Rate limits configured
  • Method restrictions applied
  • WebSocket caps enabled
  • Separate validator & RPC nodes
  • Monitoring active
  • Alerts tested

If any are missing, the system is not production-ready.

Final Thoughts

RPC security is not optional.

If your Solana application touches real users, real value, or real revenue, your RPC infrastructure must be treated as critical production infrastructure.

The strongest setups:

  • assume abuse
  • control costs per request
  • isolate failures
  • monitor relentlessly
Security is not a single tool — it's an architecture.

Related Guides

Together, these form a complete RPC operating playbook.