Cloudflare

Announcing Cloudflare K2: serverless event streams

Oct 1, 2026Micah Wylde, Marc Selwan
Announcing Cloudflare K2: serverless event streams
SummaryAI, from the source post

Introduces Cloudflare K2, a new durable event streaming primitive built on R2 object storage. K2 implements a partitioned, durable log for high-scale data movement, long-term retention, and fan-out consumption. It addresses the challenge of decoupling producers and consumers by providing a service that absorbs writes and allows independent readers to consume at their own pace. K2's architecture relies on R2 for durable storage and strongly consistent APIs, simplifying the application layer. It accumulates writes in-memory on an edge service before writing them as segment files to R2, achieving ordering and strictly incrementing offsets using R2's atomic operations. The post highlights K2's approximately 1-second produce latency at the 99th percentile due to batching and object storage writes. It differentiates K2 from Cloudflare Queues (for individual work items with retries) and Basin Pipelines (for ingestion to object storage/Iceberg tables). The post details how to create streams, produce events via HTTP API or Worker binding, create subscriptions for read parallelism, and consume events with ack, nack, and extend lease operations. Beta limits include 10GB storage and 30 MB/s produce per stream. Future roadmap includes higher write parallelism, message keys, push-based worker consumers, and Kafka client support.

More from the Asynchronous Messaging & Queuing trail