The Durable Streams Protocol is a minimal HTTP-based protocol for creating, appending to, and reading from durable, append-only byte streams. It provides a simple, web-native primitive for applications requiring ordered, replayable data streams with support for catch-up reads, live tailing, and explicit stream closure.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/durable-streams/durable-streams/llms.txt
Use this file to discover all available pages before exploring further.
What is a stream?
A stream is simply a URL-addressable, append-only byte stream that you can read and write to using standard HTTP methods. Streams are durable and immutable by position—new data can only be appended to the end.Core operations
The protocol defines six primary operations that work with stream URLs:PUT https://streams.example.com/my-stream
Content-Type: application/json
{"message": "initial data"}
Stream properties
Every stream has the following characteristics:Durability: Once written and acknowledged, bytes persist until the stream is deleted or expired.
Immutability by position: Bytes at a given offset never change; new data is only appended.
Ordering: Bytes are strictly ordered by offset.
Content type: Each stream has a MIME content type set at creation (e.g.,
application/json, text/plain, application/octet-stream).Independent read/write implementation
Servers may implement the read and write paths independently. This flexibility enables different use cases:Read-only server
A database synchronization server may only implement the read path and use its own internal injection system for writes.
Full read/write server
A collaborative editing service implements both paths to allow clients to append changes and read the stream.
URL structure
The protocol does not prescribe a specific URL structure. Servers may organize streams using any URL scheme they choose:/v1/stream/{path}/streams/{id}- Domain-specific paths like
/chat/room-1or/db/users/changes
Example: Complete workflow
Here’s a complete example showing create, write, and read operations:Why HTTP?
Durable Streams uses HTTP because it:- Works universally across web browsers, mobile apps, native clients, IoT devices, and edge workers
- Leverages existing infrastructure (CDNs, proxies, load balancers)
- Supports standard authentication and authorization patterns
- Enables caching and request collapsing for efficient scaling
- Requires no custom protocols or special network configuration
Next steps
Streams and Offsets
Learn how offset-based positioning enables resumable reads
Message Framing
Understand how different content types handle message boundaries
Live Modes
Explore long-polling and SSE for real-time updates
Idempotent Producers
Implement exactly-once write semantics