WebSocket
Real-time subscriptions for slots, account changes, and transaction logs.
Endpoint
ws://cute-rabbit.by.supanode.xyz:8900/
Plain WebSocket, no TLS. Access restricted by IP allowlist.
Example
const { Connection } = require('@solana/web3.js');
const connection = new Connection("http://cute-rabbit.by.supanode.xyz:8899/", {
wsEndpoint: "ws://cute-rabbit.by.supanode.xyz:8900/",
commitment: 'confirmed'
});
connection.onSlotChange((slotInfo) => {
console.log("New Slot:", slotInfo.slot);
});
Limits
- Concurrent connections: 10 on shared tiers, custom on dedicated
- Subscriptions per connection: 50
- Message rate: no hard cap, but excessive streaming gets throttled (fair use)
Reconnection
Connections can drop — network blips, allowlist updates, server maintenance. A few things to keep in mind:
- Use exponential backoff for reconnects. Don't hammer the endpoint immediately after a disconnect.
- Re-subscribe after reconnecting. Subscriptions don't survive a connection reset.
- Make sure your client handles WebSocket ping/pong frames to keep the connection alive during idle periods.
- If you're using
logsSubscribeorprogramSubscribe, apply filters (mentions,memcmp) to keep the data volume manageable.