# Yardswitch

### What it is

Yardswitch is a low-latency multiplexer for Solana data. It maintains hot connections to a cluster of backend validator nodes, deduplicates the combined stream on a first-come, first-served basis, and re-serves the result to your application over a single Yellowstone gRPC subscription.

Whichever backend node emits a given slot, account, transaction, or block first wins, so a Yardswitch subscription is consistently faster than any single node it sits in front of. A slow or temporarily unreachable upstream cannot delay your stream — the next node in the cluster has already delivered the same message.

### Key facts

* **50–100 µs of added overhead per message**, depending on subscription type. Measured end-to-end between the first backend node to emit a message and your client receiving it.
* **216,000-slot rolling replay window** (\~24 hours at mainnet slot times). Reconnect with `from_slot` set and Yardswitch streams the historical window from disk, then transitions seamlessly to live.
* **Full Yellowstone gRPC compatibility.** Yardswitch speaks the unmodified `geyser.proto` schema. Existing Yellowstone client libraries work as-is — point them at a Yardswitch endpoint and ship.

### Replay details

`from_slot` replay covers **slots, accounts, transactions, entries, and blocks\_meta**. Intra-slot account writes are preserved: if a program wrote to the same account multiple times in a single slot, every write\_version is delivered in order, so replayed state matches what a live subscriber would have seen.

The reconstructed `blocks` subscription is **live-only**. A `subscribe_blocks` request with `from_slot` set is rejected with `InvalidArgument: blocks are not possible to replay`. To get block-level data for the historical window, either:

* Subscribe to `blocks_meta` + `transactions` + `entries` (all replay) and join client-side on `slot`, or
* Subscribe to `blocks` without `from_slot` for the live tail only.

### Compatibility

Any Yellowstone gRPC client works without modification:

* `yellowstone-grpc-client` (Rust)
* `@triton-one/yellowstone-grpc` (Node / TypeScript)
* `yellowstone-grpc-python`
* `yellowstone-grpc-go`

The only Yardswitch-specific changes to existing code are the endpoint URL and the `x-token` header. The full `SubscribeRequest` schema — filters, commitment levels, account-data slicing — behaves exactly as documented in the Yellowstone reference.

```rust
let mut client = GeyserGrpcClient::build_from_shared(YARDSWITCH_ENDPOINT)?
    .x_token(Some(YARDSWITCH_TOKEN))?
    .connect()
    .await?;
// Standard Yellowstone gRPC usage from here.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solanavibestation.com/developers/streaming/overview/yardswitch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
