Better HN
topnewbestaskshowjobs
Log inSign up

turbofish20

2 karma · joined Oct 1, 2026 (2mo ago) · 2 submissions

Submissions

comment 2mo ago · link · parent

The tail latency is higher than we would expect, but tbh our Consume API have work to do in terms of perf optimization. If it's not much to ask, can you share what's the max_records and the size of the stream that it was tested on? We are working on improving the read latency and you should be able to observe them in a week or so :)

comment 2mo ago · link · parent

I work on the K2 team with Micah.

A stream can have up to 100 subscriptions. Each one has its own cursor, so every subscription sees every event independently. Events aren't dropped once they're consumed; they stay until the stream's retention period runs out, so you can replay or add a new subscription later.

Within a subscription, any number of workers can consume, with up to 128 batches in flight at once. Each batch is a lease owned by exactly 1 worker, and if that worker polls again it gets the same batch back. When it acks, the batch is done and the cursor moves forward. It can also nack to hand the batch back right away or extend the lease if it needs more time. If it does neither, the lease expires after 5 minutes and the same records go to the next worker that polls, as a new batch. That's where the "at least once" comes from, a late ack from the original worker is just ignored.