Cloudflare K2: serverless event streams
Cloudflare has introduced K2, a serverless event streaming service built on object storage, positioned as a cheaper, fully managed alternative to Kafka- and Pub/Sub-style systems for moving large volumes of data. Commenters contrast K2 with Cloudflare Queues (actions with retries vs. high-throughput event logs), highlight trade-offs between lower cost and higher end-to-end latency, and note a planned Kafka-compatible API to ease adoption. The launch is framed within a broader trend toward “object-store-first” infrastructure, while raising recurring concerns about vendor lock-in, egress pricing, and Cloudflare’s expanding role in the cloud ecosystem.
Purpose and Positioning
- K2 is presented as a serverless, durable event stream primitive within Cloudflare’s developer platform.
- Differentiated from Cloudflare Queues:
- Queues: “do this work” – per-message retries, dead-letter handling, delayed jobs, and tracking individual tasks.
- K2: “this happened” – high-volume event logs, multiple independent consumers, replay, long-term retention, Kafka-like patterns.
- Several commenters see it as filling a long-missing “Kafka-style” gap in Cloudflare’s stack.
Architecture and Object Storage Trend
- Built on object storage (Cloudflare R2) to achieve low-cost, durable, scalable storage.
- Fits a broader trend: many modern systems (Kafka-like, registries, databases) are being rebuilt “on S3-style object stores.”
- Some argue almost everything not needing sub-100 ms latency is moving to object storage; others find it perverse given how fast NVMe is.
Comparisons to Alternatives
- Compared to Kafka / MSK / Confluent: cheaper, fully serverless, no clusters to manage, but higher latency.
- Compared to Google Pub/Sub and AWS Kinesis: main perceived differentiator is cost (especially for long retention) and tight Cloudflare integration / edge focus.
- NATS JetStream and other S3-backed Kafka-like products (AutoMQ, WarpStream, diskless Kafka topics) are mentioned as similar space.
Pricing and Performance
- Published baseline pricing discussed: ~$0.04/GB produced, ~$0.04/GB consumed, ~$0.02/GB-month storage.
- Some see this as attractive vs managed Kafka; others note fan-out can get expensive since each consumer pay-per-GB.
- Latency trade-offs: commenters cite ~1s p99 as expected for object-storage-backed streams; some test reports show a few seconds end-to-end.
Semantics and API
- At-least-once delivery with acknowledgment/lease semantics; per-stream support for up to 100 subscriptions, each with its own cursor and replay ability.
- Ordered vs unordered use cases: ordering handled by key-based grouping; unordered consumption is simpler.
- Kafka-compatible APIs are planned to ease portability, though K2’s own API is intentionally simpler than Kafka’s.
Cloudflare Strategy and Concerns
- Some praise Cloudflare for rapidly building a nearly full cloud platform, with K2 plus other services forming a compelling ecosystem.
- Others worry about product velocity, recent layoffs, and vendor concentration/monopoly risk.
- There are calls for stronger database offerings and D1 improvements to round out the platform.