Readers can replay history, catch up from a cursor, poll for recent records, or follow a stream live. S2’s CDN-like internal architecture allows for a large number of concurrent readers.Documentation Index
Fetch the complete documentation index at: https://s2.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Behavior
A read has three behavioral controls: where it starts, which bounds stop it, and whether it waits at the tail. Reads can start from one of the following:- record sequence number
- record timestamp
- a tail offset, i.e. N records before the current tail, or the head of the stream if there are fewer records
S2 returns records in stream order, starting with the earliest record at or after the requested position.
- single-batch reads have implicit record count and byte caps, and return immediately
- read sessions have no bounds, and follow indefinitely
Interfaces
Use the interface that matches the consumer:| Interface | Use when |
|---|---|
| Single-batch read | You need one bounded response, optionally long polling at the tail. |
| Read session | You need to scan multiple batches, catch up from a cursor, or follow the stream continuously. |
| Check tail | You only need the current tail position, not the records themselves. |
Consistency
Stream operations are linearizable. If anappend has been acknowledged, any subsequent read or check-tail operation reflects that write.
Latency
Time-to-first-byte latency for records written in the last 20 seconds to an Express stream is expected to be single-digit milliseconds. Otherwise, it can be up to 200 milliseconds. Tail checks return only the current tail position and are expected to complete in single-digit milliseconds.Latency expectations assume an authenticated client in the same region as the basin.
See also
Reading SDK
Use single-batch reads, read sessions, and check-tail calls.
Read API
Review request parameters, SSE sessions, wait behavior, and
416 cases.Stream positions
Head, tail, sequence numbers, and timestamps.

