# Solana WebSocket subscriptions (/solana-rpc/websocket)

> Subscribe to Solana PubSub over the Corvus WebSocket endpoint on port 8900 and rebuild subscriptions correctly after a disconnect.



Standard Solana PubSub lives at `ws://<region>.corvus-labs.io:8900`, in the same five metros as JSON-RPC: `fra`, `ams`, `lon`, `nyc`, `tyo`. Keep the `ws://` scheme ([transport security](/platform/access#transport-security)).

## Subscriptions

You subscribe by sending a JSON-RPC 2.0 request over the socket:

```json
{"jsonrpc":"2.0","id":1,"method":"slotSubscribe"}
```

The reply carries the subscription ID:

```json
{"jsonrpc":"2.0","result":42,"id":1}
```

The ID is only meaningful on the socket that issued it, so keep your subscription intent (accounts, programs, commitment) separate from the IDs the server hands back.

The methods, notification shapes and commitment options are all standard Solana; the [Solana WebSocket reference](https://solana.com/docs/rpc/websocket) documents them.

## Reconnecting

When the socket closes, the server drops every subscription that was on it. Nothing is redelivered and there's no cursor to pick up from.

* PubSub sends nothing when nothing matches, so a quiet socket isn't a signal; use protocol pings for liveness.
* Re-issue every `*Subscribe` call from your stored intent and swap in the IDs the new connection gives you.
* Backfill from your last processed slot or signature over [JSON-RPC](/solana-rpc/json-rpc) before you trust the live stream again.

## Which streaming interface?

| Need                                                     | Use                                              |
| -------------------------------------------------------- | ------------------------------------------------ |
| Standard Solana PubSub, drop-in SDK compatibility        | WebSocket, port 8900                             |
| Typed, filterable account/transaction/slot/block streams | [Yellowstone gRPC](/solana-rpc/grpc), port 10101 |
| Pre-execution entry, transaction, and slot streams       | [aRPC](/arpc), port 20202                        |

WebSocket and Yellowstone gRPC run in the five Solana RPC metros; aRPC runs in all nine, so in some regions it's the only one of the three you can reach. [Regions](/platform/regions) has the matrix.

## Failure modes

A socket that opens and then closes without ever delivering a notification is an access problem: your egress IP isn't on the allowlist, or the tokenized path is wrong. See [Access & authentication](/platform/access).
