Canonical: https://nitride.xyz/compare/shreds-vs-rpc-websockets

# Shreds vs RPC WebSockets

RPC WebSocket subscriptions are simple and report state at the commitment you choose. Raw shreds arrive earlier but need a decoder. Which to use, and when.

RPC WebSocket subscriptions such as logsSubscribe and accountSubscribe report what a node has already processed, at a commitment level you choose, in a ready to use format. Raw shreds arrive earlier, while the leader is still broadcasting the block, but you decode them yourself and they carry no execution results. Many bots use both.

## Pick by workload

- **Your bot races others to the same opportunity:** shreds. A WebSocket notification comes after a node has processed the transaction, which is too late to act before it lands.
- **Your bot reacts to balances or account state:** RPC WebSockets. accountSubscribe tells you the new state; a shred only tells you an instruction is coming.
- **You send alerts to people:** RPC WebSockets are usually enough. A human reading a message will not notice the difference, and confirmed data avoids false alarms.
- **You need an early warning and a confirmation:** both. Act or prepare on the shred, settle on the WebSocket notification. The [trading data stack](https://nitride.xyz/blog/solana-trading-data-stack) shows how the layers fit.

## What breaks with each

| Problem | RPC WebSockets | Raw shreds |
| --- | --- | --- |
| Arrives too late for racing | Yes; notifications follow processing | No; shreds arrive during broadcast |
| Dropped connections | Subscriptions end with the connection and must be recreated | No connection to drop; packets can be lost instead |
| Missed messages | Gaps after a reconnect are easy to miss | Lost UDP packets are gone; coding shreds recover some |
| Node load | Busy public nodes can lag or throttle subscriptions | Volume is the whole stream; your receiver must keep up, especially in a [launch frenzy](https://nitride.xyz/blog/launch-frenzy-packet-rates) |
| False positives | Rare at confirmed commitment | Possible; a shred can belong to a block that is later skipped |
| Effort | Low: JSON messages | Higher: a decoder for shreds and entries |

## What changed in October 2026

Two mainnet changes matter to anyone choosing between these feeds.

Slots now target 200 milliseconds, down from about 400, since October 9, 2026. A bot sees twice as many slots in a minute, so a WebSocket client that reconnects slowly misses more of them, and a shred receiver has to keep up with a busier stream. Neither feed got slower, but both have less room for sloppy handling.

Alpenglow's voting layer went live on October 21, 2026. Anza's documentation describes confirmed and finalized as equivalent statuses under it, so a subscription at finalized no longer waits much longer than one at confirmed. That narrows one old reason to accept weaker commitment on a WebSocket, but it does not close the gap to shreds, which arrive before any execution or vote at all.

## Moving a logsSubscribe bot to shreds

A common starting point is a bot that calls logsSubscribe with a mentions filter for one program, waits for a log line, then acts. Moving its trigger to shreds takes four changes.

**1. Replace the trigger, keep the check.** Shreds become the trigger: your receiver rebuilds each transaction and tests whether it touches the program's account. The WebSocket subscription stays, but now it confirms what the shred path already saw.

**2. Match on accounts, not logs.** Logs are produced by execution, so they do not exist in shreds. Match on the program id and the accounts in each transaction's static account keys instead. Transactions that load accounts through address lookup tables need the table resolved before you can see those accounts.

**3. Decode instructions yourself.** Where the log told you what happened, you now read the instruction data and work out what is about to happen. That is where the time saving comes from, and it is also where most bugs hide, so test against a day of logged traffic.

**4. Handle the messy cases.** Skipped slots, duplicate shreds and lost packets all appear in a raw stream. Keep a per slot record, drop anything you cannot complete, and let the confirmation side cancel actions on transactions that never land, as described in [avoiding false positives from shreds](https://nitride.xyz/blog/shreds-are-not-confirmations).

Our [UDP wire contract](https://nitride.xyz/docs/udp) describes the datagrams you receive. For the Geyser side of the same question, see [shreds vs Geyser gRPC streams](https://nitride.xyz/compare/shreds-vs-geyser-grpc), and for the cost of a feed against running your own node, [buy shreds or run your own validator](https://nitride.xyz/compare/shreds-vs-running-a-validator). The two routes we sell are explained in the [Ultra vs Standard comparison](https://nitride.xyz/compare/ultra-vs-standard-shreds), every seller is in the [provider comparison](https://nitride.xyz/compare/best-solana-shredstream-providers), plans are on [pricing](https://nitride.xyz/pricing), and the [compare hub](https://nitride.xyz/compare) lists the rest.

### Why is my logsSubscribe notification late?

It arrives after the node has processed the transaction at your chosen commitment, and busy nodes add their own delay. Shreds arrive before processing.

### Can I filter a shred stream like a subscription?

No. A raw stream carries every shred, and your code selects the transactions it cares about.

### Do I still need RPC if I buy shreds?

Yes, for anything that depends on results. Shreds tell you what the leader packed; RPC tells you what happened to it and what the accounts look like now.

### Is a WebSocket feed cheaper?

Usually. Many RPC plans include WebSocket subscriptions, while a shred feed is a separate purchase and needs a decoder.
