Cloudflare has introduced K2, a new serverless event streaming service currently in public beta, designed to address limitations in traditional remote procedure call (RPC) archi...
Cloudflare has introduced K2, a new serverless event streaming service currently in public beta, designed to address limitations in traditional remote procedure call (RPC) architectures where producers and consumers must synchronize in scale and timing. When producers generate excessive data or consumers become unavailable, events are often dropped, particularly in scenarios involving multiple independent consumers such as analytics systems or fraud detection services. To resolve this, K2 introduces a decoupled model using a durable, ordered log that absorbs writes and enables consumers to process data at their own pace.
The service stores events as an immutable log and supports multiple consumption patterns, including batched reads distributed across multiple consumers or delivery to all subscribers. Built on Cloudflare's global edge network, K2 leverages R2 object storage for durability and scalability, using atomic operations to maintain ordering without requiring a separate coordination layer. This architecture allows independent scaling of compute and storage, enabling long-term data retention at lower cost.
Initial implementation introduces approximately one second of production latency at the 99th percentile due to batching requirements before writes to object storage. K2 is available in public beta for accounts with Workers Paid subscriptions, with current limits of 10GB of storage and 30MB per second of data production. Pricing, when introduced, will charge $0.04 per GB for data produced, consumed, and retained monthly, though no billing occurs during the beta period.
K2 differs from existing Cloudflare offerings such as Queues and Basin Pipelines. While Queues manage discrete work items with complex retry logic, K2 is optimized for high-volume data movement and fan-out consumption patterns. Basin Pipelines focuses on ingestion and transformation of events into object storage or analytics tables, whereas K2 supports custom processing workflows and broader integration use cases.
Developers can create streams via command-line tools, APIs, or the dashboard. For example, a stream can be initialized using the Cloudflare CLI, after which events can be produced via HTTP APIs or Worker bindings. Consumption occurs through subscriptions, which can be configured to start from the earliest available data and lease batches for processing. Consumers acknowledge processed batches to prevent redelivery or extend leases when additional time is needed.
The design emphasizes reliability and scalability within Cloudflare's edge infrastructure, where traditional distributed systems like Apache Kafka are impractical due to resource constraints. By relying on R2's strongly consistent APIs, K2 achieves durability and consistency while maintaining operational simplicity. Future developments include enhanced throughput, message key support, push-based consumption, and compatibility with Apache Kafka clients.
The service is positioned as a foundational component for event-driven architectures requiring resilient data pipelines, particularly in environments where global distribution and long-term data retention are critical.
- Publisher
- Hacker News
- Reliability
- high
- Published
- 10/2/2026, 12:30:39 PM
- Retrieved
- 10/2/2026, 12:30:39 PM
- Relevance
- 80%
- Confidence
- 85%

