The following limits apply to K2.
During the public beta, each account can store up to 10 GB across all streams. To request a higher limit, use the form linked at the end of this page.
| Feature | Limit |
|---|---|
| Maximum streams per account | 20 |
| Minimum retention period | 1 hour (3600 seconds) |
| Maximum retention period | 30 days (2592000 seconds) |
| Default retention period | 7 days (604800 seconds) |
Higher retention limits are available by request.
| Feature | Limit |
|---|---|
| Maximum request size | 5 MB (5,000,000 bytes) |
| Maximum record size | ~1 MB (1,000,000 bytes) |
| Maximum headers per record | 32 |
| Maximum header name size | 256 bytes |
| Maximum header value size | 8 KiB (8,192 bytes) |
| Maximum total header size per record | 64 KiB (65,536 bytes) |
The maximum request size applies to the HTTP request body both before and after
gzip decompression + a small amount of internal metadata. For the Workers
binding, it applies to the total size of the records in a single send() call.
The maximum record size applies to the decoded record content, and to the record content and headers combined. Header sizes are measured in UTF-8 bytes.
There is no limit on the number of records in a request, other than the maximum request size.
| Feature | Limit |
|---|---|
Maximum max_records per consume request |
10,000 |
| Maximum data per consume response | 10 MB |
worker_id length |
1 to 256 characters |
| Maximum active leases per subscription | 128 |
| Maximum subscriptions per stream | 100 |