Better HN
topnewbestaskshowjobs
Log inSign up

alexwebr

55 karma · joined Feb 18, 2025 (1y ago) · 4 submissions

Submissions

comment 1y ago · link · parent

(Author here)

Fair enough. I agree .25^20 is basically infinitesimal, and even with a smaller exponent (like .25^3) the odds are not great, so I appreciate you calling this out.

Flipping this around, though, if you have 4 workers total and 3 are busy with jobs (1 idle), your next job has only a 25% chance of hitting the idle worker. This is what I see the most in practice; there is a backlog, and not all workers are busy even though there is a backlog.

comment 1y ago · link · parent

(Author here)

You say: > What that post describes (all work going to one/few workers) in practice doesn't really happen if you properly randomize (e.g. just use random UUID) ID of the item/task when inserting it into Kafka.

I would love to be wrong about this, but I don't _think_ this changes things. When you have few enough messages, you can still get unlucky and randomly choose the "wrong" partitions. To me, it's a fundamental probability thing - if you roll the dice enough times, it all evens out (high enough message volume), but this article is about what happens when you _don't_ roll the dice enough times.

comment 1y ago · link · parent

(Author here)

RabbitMQ or AWS SQS are probably good choices.

4.

Kafka at the low end: how bad can it get?(broot.ca ↗)

133 points · by alexwebr · 1y ago · 139 comments