Cloudflare launched K2 on October 1 — a serverless event streaming service built on top of R2 object storage. It gives developers a durable, ordered event log with fan-out consumer support, configurable retention up to one month, and zero broker infrastructure to manage. The public beta opened yesterday for Workers Paid subscribers.
The pitch is direct: most teams running Kafka do not actually need Kafka’s sub-100ms latency. They need the model — ordered log, multiple independent consumers, long retention, replay capability — without the ops tax. K2 bets that the ops tax is the real problem, not event streaming itself.
How Cloudflare K2 Works: Object Storage as Event Bus
K2 implements a partitioned, durable log on top of R2. Edge services accumulate writes in-memory before flushing complete segment files to R2, and R2’s atomic operations handle offset ordering without a separate coordination service. No ZooKeeper. No KRaft. No partition math. The architectural tradeoff is deliberate: this batching introduces roughly 1 second of produce latency at p99 — well above Kafka’s sub-100ms but competitive with AWS Kinesis’s typical 1–5 second end-to-end delivery window.
From a Worker, producing events is straightforward:
export default {
async fetch(request, env) {
await env.K2_STREAM.send([
{ content: JSON.stringify({ event: "page_view", url: request.url }) }
]);
return new Response("OK");
}
}
Consumers attach via subscriptions. Two patterns are supported: partitioned consumption, where multiple workers divide a stream’s records among themselves, and pub/sub, where each subscription receives every message. Batches arrive with 5-minute leases; consumers ack, nack, or extend. It is a familiar model for anyone who has worked with Kinesis or Pub/Sub — just without the infrastructure behind it.
Related: Cloudflare Replaces Wrangler With cf CLI — Migrate Now (K2 streams are created and managed via the cf CLI)
Where K2 Fits in the Cloudflare Data Stack
Cloudflare now has three distinct data-movement primitives, and conflating them is the first mistake teams make. Queues handles individual work items with retries — image processing jobs, email sends — billed per operation. K2 handles high-volume data streams with fan-out and long retention, billed per byte. Basin Pipelines ingests events and writes them to R2 or Iceberg tables as the analytics sink. A Cloudflare engineer on Hacker News put it plainly: “Queues are great when you have a unit of work that needs to be completed…K2 is for moving large volumes of data around.”
Against external competitors, the meaningful comparison is not Kafka — it is Kinesis. Both K2 and Kinesis deliver events with 1–5 seconds of end-to-end latency. Kafka’s sub-100ms wins only where real-time processing is strictly required; for analytics pipelines, telemetry aggregation, and microservice event buses, K2’s latency is entirely acceptable. Moreover, the R2 backend eliminates egress fees when consuming from within Workers — a real cost advantage over Kinesis at scale, where AWS charges up to $90 per TB for egress.
The Three K2 Tradeoffs Worth Knowing
The Hacker News community landed on three concerns immediately after the K2 launch, and they are worth addressing directly. First, latency: the stated 1-second p99 produce latency reflects batching to R2, but end-to-end delivery — including consumer polling intervals — ran at p95=2.5s and p99=7.5s in early beta testing. Do not use K2 for anything requiring sub-second delivery.
Second, fan-out pricing. The anticipated rate of $0.04 per GB consumed sounds modest until you model multiple independent subscribers: 10 consumer subscriptions means 10× the consumption cost. One developer flagged it on HN: “$0.04/GB consumed is rather steep…fan-out consumer strategies get very expensive very fast.” Kinesis charges per shard-hour regardless of consumer count — a fundamentally different cost structure. Run the math for your fan-out factor before committing.
Third, there is no Kafka protocol compatibility. Existing Kafka client code cannot point at K2. Migration requires a rewrite to Cloudflare’s HTTP API or Worker binding. Teams with significant Kafka investment will find this a hard blocker.
When Cloudflare K2 Is the Right Call
K2 is a strong fit when you are already running on Cloudflare Workers, your use case is analytics or telemetry aggregation, latency tolerance exceeds one second, and you want fan-out semantics without managing consumer group state. It is the wrong call for real-time latency-sensitive systems, existing Kafka deployments, or high-fan-out workloads where the per-byte consumption cost compounds. In beta today, with 10GB storage and 30 MB/s throughput caps, it is not yet suited for production-scale deployments — but the architecture is sound and the trajectory toward GA is evident.
Key Takeaways
- Cloudflare K2 launched October 1 in public beta for Workers Paid subscribers — serverless event streaming with no brokers, no partition management, no ZooKeeper
- The architectural tradeoff is ~1 second p99 produce latency (R2 batching) in exchange for zero operational overhead — competitive with Kinesis, well behind Kafka
- Cloudflare’s data stack now has three tiers: Queues (work items + retries) → K2 (event streams + fan-out) → Pipelines (event sink to R2/Iceberg)
- Fan-out pricing multiplies per subscriber at $0.04/GB consumed — model your cost before committing to pub/sub patterns at scale
- No Kafka protocol support means migration from existing Kafka systems requires a rewrite, not a drop-in swap

