# Connection lifecycle

> HyperCore private-preview documentation.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Callout intent="info">
  This API is in private preview. Target September 2026; timing is subject to change.
</Callout>


# Connection lifecycle

## Lifecycle

1. Open a TLS WebSocket connection.
2. Authenticate when the connection is established.
3. Send one or more subscription frames.
4. Wait for an acknowledgement for each subscription.
5. Process messages and persist the latest cursor for each replay-capable subscription.
6. If the connection closes, reconnect with exponential backoff and jitter.
7. Resume replay-capable subscriptions from their last persisted cursor. Complete-snapshot streams resubscribe without a cursor.

## Heartbeats

The connection uses WebSocket ping and pong frames. Clients must respond promptly and should treat a missed pong as a dead connection, then reconnect.

## Sequencing and recovery

For the sequencing and recovery model, see [timestamps, cursors, and replay](/docs/data/hypercore/concepts/timestamps-cursors-and-replay).

> For replay-capable subscriptions, resume is per subscription: supply the last persisted cursor in that subscription's subscribe frame. Complete-snapshot streams resubscribe without a cursor.

## Backpressure and slow consumers

Clients should apply bounded queues. A consumer that cannot keep up may receive an error frame before the connection is disconnected.

## Errors

Errors arrive as a structured frame on the same connection.