Build1 publisherNot yet confirmed elsewhere3 min readPublished
Cloudflare's K2 trades a second of produce latency for an event log kept in R2
Cloudflare's K2 streaming beta keeps its event log in R2 object storage at a stated cost of about one second of p99 produce latency. Its case is price and elasticity, so pipelines with many consumers or tight delivery windows have numbers to check before billing starts.
The Engineer · Build desk

What happened
- K2 holds writes in memory on an edge service and flushes each batch to R2 as a segment file, with R2's atomic operations assigning order and offsets.
- One beta user reported writes under a second but end-to-end delivery at 2.5 seconds p95 and 7.5 seconds p99.
- K2 charges $0.04 per GB produced and the same per GB consumed, plus $0.02 per GB-month of retention, though nothing is billed during the beta.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint Pipelines that need delivery inside a second fall outside Cloudflare's own promise, and the beta's consume path currently runs well behind even that figure at the tail.
- cost A stream read by five consumers costs $0.24 per GB, three times the one-consumer price, so fan-out designs carry most of the bill once billing starts.
- decision Picking among K2, s2.dev, AutoMQ, WarpStream or diskless Kafka topics partly means picking where each vendor sets its flush window between PUT spend and delay.
Object stores cannot append, and a log is a sequence of appends [2]. K2 works around this by holding incoming writes in memory on an edge service. It waits briefly for more to arrive, then writes the batch to R2 as one segment file [2]. That wait is where the second of p99 produce latency comes from [1][2].
The length of the wait is also a billing setting. Commenter sensodine, who disclosed that he works on the competing service s2.dev, wrote: "One of the tensions of course is how long to linger before flushing to object storage - you have to trade off directly between latency and cost of your API ops for PUTs." [3]
The design has few moving parts. R2 provides eleven nines of durability behind strongly consistent APIs [8]. Its atomic operations give K2 ordering and incrementing offsets, so no coordination service runs at all [9]. Replication and consensus live in the storage layer, and compute scales separately from storage [8]. I think this is the right call for the problem Cloudflare had. K2 began as a place for Pipelines to park events before its pull-based engine reads and transforms them [6]. Pipelines runs on small slices of ephemeral machines in more than 335 cities, over the public internet, and InfoQ reports that Kafka assumes none of that [7].
The one-second figure covers produce [1]. For it to describe what a consumer sees, the read path has to keep pace. In the beta it has not yet, according to one user. Posting as e1g, that user reported writes under a second but end-to-end delivery at p95 2.5 seconds and p99 7.5 seconds [10]. That tail is about 7.5 times the produce figure [19]. A commenter answering for the team said it was higher than they would expect, that the Consume API needs performance work, and that read latency improvements should appear within about a week [11].
Pricing sets the second condition. K2 charges $0.04 per GB produced and the same again per GB consumed [14]. Commenter nnx wrote: "This means actual usage is $0.08/GB in the simplest case (one consumer) but fan-out consumer strategies get very expensive very fast." [15] Each added consumer costs another $0.04 per GB. Five consumers bring a stream to $0.24 per GB, triple the one-consumer price [20]. Cloudflare positions K2 for fan-out [16]. Retention costs $0.02 per GB per month, and nothing is billed during the beta, so for now fan-out is free [17].
nnx still made the cost case. He said K2 beats Google Pub/Sub on cost, especially for long retention, and runs much cheaper than self-hosted Kafka or hosted versions such as Amazon MSK and Confluent, with no clusters to manage [22]. He put both produce and end-to-end latency at around one second p99 [4].
Several systems now use the same pattern. Thread participants asked how K2 differs from AutoMQ and WarpStream, and noted that Kafka now supports diskless topics [18]. Another commenter, psanford, wrote: "Object store is quickly becoming the new core data substrate. Lets build kafka, but on s3. Lets build github, but on s3." [24] The post's author, necubi, who said he is K2's tech lead, agreed that every data system without a sub-100ms requirement is moving to object storage [23].
The s2.dev engineer argued the pattern can go lower. He said s2.dev's stateful backends keep flushing multi-tenant objects holding records from many streams, reaching roughly 50ms p99 acknowledgment latency within a region [12]. His claimed figure is one-twentieth of K2's stated produce p99 [21]. He pointed to S3 Express and GCS rapid buckets as faster tiers, though both are single-zone and still need quorum writes for regional durability [13].
What to watch
- Whether the read-latency improvements promised within about a week pull K2's end-to-end p99 close to its one-second produce figure.
- Whether Cloudflare changes the per-GB consume charge before beta billing begins, given that it positions K2 for fan-out.
- Whether K2 adds a shorter flush window or a faster storage tier aimed at workloads below 100ms.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence55
- Adoption12
- Hype gap+20
- Incentives55
- Confidence50
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
Cloudflare trades latency for cost and elasticity in K2 and states about one second of produce latency at p99.
ReportedSupportedSource: InfoQ, citing Cloudflare2 sources— create a free account to open themView cited source - [2]
Object stores cannot append. K2 holds writes in memory on an edge service, pauses to let more arrive, then writes the batch out as a segment file; that pause is the latency.
- [3]
One of the tensions of course is how long to linger before flushing to object storage - you have to trade off directly between latency and cost of your API ops for PUTs.
ReportedSupportedSource: Commenter sensodine, who disclosed working on s2.dev, via InfoQ2 sources— create a free account to open themView cited source - [4]
nnx put K2's produce and end-to-end latency at around 1s p99, against systems that rely on local disk replication.
ReportedSupportedSource: Commenter nnx, via InfoQ2 sources— create a free account to open themView cited source - [5]
Cloudflare launched K2 in public beta, a serverless event streaming service built on a partitioned durable log stored in R2 object storage.
- [6]
K2 started as storage for Pipelines, which needed a durable place to park events before its pull-based processing engine read and transformed them.
- [7]
Pipelines run across an edge of more than 335 cities, on small slices of ephemeral machines, networked over the public internet, and Kafka assumes none of that.
- [8]
R2 gives eleven nines of durability with strongly consistent APIs; pushing replication and consensus into the storage layer simplifies the application layer and lets compute and storage scale separately.
- [9]
R2's atomic operations supply K2's ordering and incrementing offsets, so there is no coordination service.
- [10]
Hacker News commenter e1g, running the beta, reported writes under a second but end-to-end delivery latency of p95 2.5 seconds and p99 7.5 seconds.
- [11]
A commenter answering for the K2 team said the tail latency was higher than they would expect, the Consume API has work to do on performance, and read latency improvements should be visible within about a week.
- [12]
sensodine said s2.dev uses stateful backend processes constantly flushing multi-tenant objects containing records from many streams, reaching roughly 50ms p99 acknowledgment latency from the same region.
- [13]
sensodine pointed to faster object storage tiers such as S3 Express and GCS rapid buckets, both single-zone and therefore still needing quorum writes for regional durability.
- [14]
K2 charges $0.04 per GB produced and an identical charge per GB consumed.
- [15]
This means actual usage is $0.08/GB in the simplest case (one consumer) but fan-out consumer strategies get very expensive very fast.
- [16]
Fan-out is one of the use cases Cloudflare positions K2 for.
- [17]
K2 retention is charged separately at $0.02 per GB per month, and nothing is billed during the beta.
- [18]
Several commenters asked how K2 differs from AutoMQ and WarpStream, which apply the same object-storage pattern, and noted that Kafka itself now has diskless topic support.
- [19]
The beta user's reported end-to-end p99 of 7.5 seconds is about 7.5 times K2's stated produce p99 of about one second.
- [20]
With N consumers, K2 data cost per GB is $0.04 + $0.04 x N; five consumers give $0.24 per GB, three times the $0.08 one-consumer case.
- [21]
s2.dev's claimed 50ms p99 acknowledgment latency is one-twentieth of K2's stated produce p99 of about one second.
- [22]
nnx said K2's advantage over Google Pub/Sub is cost, particularly for longer retention, and that object storage makes it much cheaper than self-hosted or cloud-hosted Kafka such as Amazon MSK or Confluent, with no clusters to manage.
- [23]
Commenter necubi, who identified himself as the post's author and K2's tech lead, agreed that every data system not requiring sub-100ms latency is moving to object storage.
- [24]
Object store is quickly becoming the new core data substrate. Lets build kafka, but on s3. Lets build github, but on s3.
Sources
1 independent publisher whose own reporting we read for this story.
- infoq.comCloudflare K2 Builds Event Streams on R2 Object Storage, at a Second of Produce Latency
1 article · October 8, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- Event streamingFollow
- Object-storage-backed data systemsFollow
- Serverless computingFollow
Entities
- CloudflareFollow
- Cloudflare K2Follow
- Cloudflare R2Follow
- PipelinesFollow
- Apache KafkaFollow
- s2.devFollow
- AutoMQFollow
- WarpStreamFollow
- Google Pub/SubFollow
- Amazon MSKFollow
- ConfluentFollow