Products#Cloud

Cloudflare K2 beta: Kafka-style serverless event streams running on R2

Cloudflare launched K2 in beta: a partitioned durable log on R2, ordering from atomic operations with no coordination service, plus consumer leases and pub/sub.

Cloudflare blog art: a magnifying glass over a mountain, with data-flow lines

Cloudflare launched K2 in beta during its Birthday Week: a Kafka-style partitioned durable event log running on R2 — the first “serverless event streams” entry into the Workers ecosystem.

The facts

  • Architecture: partitioned durable log on R2 (11 nines of durability); ordering and offsets come from R2 atomic operations with no separate coordination service — no ZooKeeper/KRaft equivalent; writes buffer in memory, then flush as segment files.
  • The trade: initial produce latency sits near 1s p99 — this is not a low-latency message queue.
  • Consumption: offsets, consumer leases (5-minute ack/nack/extend), work-splitting and pub/sub modes.
  • Beta limits: Workers Paid plan only, 10GB storage per stream, 30MB/s per stream, no billing yet.
  • Planned pricing: $0.04/GB produced, $0.04/GB consumed, $0.02/GB/month retained.
  • Roadmap: Apache Kafka client compatibility, multi-GB/s parallelism, key-based ordering, a lower-latency Express tier.
  • Provenance: K2 started life as the ingestion layer for Basin Pipelines.

The position against Kafka

K2 is not fighting Kafka on latency or throughput — it is fighting it on operations: no cluster, no brokers, no capacity planning, metered per gigabyte and distributed with R2’s edge. For startups and mid-size teams already in the Workers ecosystem, the first mile of event streaming gets dramatically cheaper; for companies running Kafka, K2 is an edge-ingestion and cross-region relay complement, not a replacement.

What to evaluate

Three questions decide fit: can your consumers tolerate ~1s p99 (real-time risk engines cannot; event sourcing can); is 30MB/s per stream enough until multi-GB/s lands; and is the Workers Paid lock-in acceptable.

Editorial take

Three Birthday Week launches (the public CA, Clef decision models, K2) share one theme: turning things you operate into things you meter. If Kafka client compatibility ships as promised, K2 becomes a live test of how much premium enterprises will pay for “no ops.”

The design bet underneath

Building the log on R2 instead of broker-local disks means durability and ordering inherit R2’s atomicity — no quorum protocol to run, and no cluster to rebalance. The 1-second p99 is the price of that design, and Cloudflare is explicit that a low-latency Express tier is on the roadmap rather than in the beta. For event sourcing, audit logs, CDC replication and AI-agent action logs — where ordering and durability matter more than milliseconds — the trade is right.

The Birthday Week trio

K2 completes a trio that reads like one strategy: the public CA takes on trust infrastructure, Clef takes on the model-judgment layer, and K2 takes on event infrastructure — each converting an operationally heavy component into metered primitives on Cloudflare’s edge. The Kafka-client roadmap item is the one to watch: compatibility is what turns K2 from a Workers-era nice-to-have into a migration path for existing pipelines. Metered, edge-local, Kafka-compatible: three words that decide whether pipelines move.

A note on the durability math

R2’s eleven nines apply to stored objects, not to in-flight writes — the memory buffer is the loss window, and Cloudflare’s docs do not yet specify the flush cadence under failure. Event-sourcing teams treating K2 as their primary log should wait for the durability white-paper the way they would for any log store, and stage K2 as the edge tier with a durable sink behind it until then. Consumer leases with ack/nack/extend give exactly-once-ish semantics without a separate tracker.

Basin Pipelines heritage shows in the design: K2 is ingestion-first, which is why the read side got leases before the write side got speed. Ten gigabytes per stream is small for Kafka estates and generous for Workers apps. Beta feedback closes the loop on what the Express tier actually needs to be. Streams-per-app pricing will matter more than per-GB rates for small teams. Pair K2 with Queues for the low-latency half and the event story is complete within one platform.