Live data from Hacker News

What If We Could Rebuild Kafka from Scratch?

morling.dev

141–150 of 229 posts

Re: What If We Could Rebuild Kafka from Scratch?

#141

Earlier quoted context omitted.

It can increase latency (which can be somewhat mitigated though by having a write buffer e.g. on EBS volumes), but it substantially _reduces_ cost: all cross-AZ traffic (which is $$$) is handled by the object storage layer, where it doesn't get charged. This architecture has been tremendously popular recently, championed by Warpstream and also available by Confluent (Freight clusters), AutoMQ, BufStream, etc. The KIP…

So it's cheaper *on AWS*. Any cloud provider where cross-AZ traffic is not $$$, I can't imagine this architecture being cheaper. Engineering solutions which only exist because AWS pricing is whack are...well, certainly a choice. I can also think of lots of cases where whatever you're running is fine to just run in a single AZ since it's not critical.

[deleted]

Re: What If We Could Rebuild Kafka from Scratch?

#142
post #38

Keep an eye out for Northguard. It's the name of LinkedIn's rewrite of Kafka that was announced at a stream processing meetup about a week ago.

It solves some issues, and creates some, since Northguard isn’t compatible with the current Kafka ecosystem.

As such, you can no longer use existing software that is built on Kafka as-is. It may not be a grave concern for LinkedIn, but it could be for others that currently benefit from using the existing Kafka ecosystem.

Re: What If We Could Rebuild Kafka from Scratch?

#144

> Key-centric access: instead of partition-based access, efficient access and replay of all the messages with one and the same key would be desirable. I’ve been working on a datastore that’s perfect for this [1], but I’m getting very little traction. Does anyone have any ideas why that is? Is my marketing just bad, or is this feature just not very useful after all? 1. https://www.haystackdb.dev/

The website seems very vapid. Extraordinary claims require extraordinary evidence. Personally I see a lack of evidence here (that this vendor-locked product is better than existing freeware) and I'm going to move on.

Re: What If We Could Rebuild Kafka from Scratch?

#145
post #142
post #38

Keep an eye out for Northguard. It's the name of LinkedIn's rewrite of Kafka that was announced at a stream processing meetup about a week ago.

It solves some issues, and creates some, since Northguard isn’t compatible with the current Kafka ecosystem. As such, you can no longer use existing software that is built on Kafka as-is. It may not be a grave concern for LinkedIn, but it could be for others that currently benefit from using the existing Kafka ecosystem.

Yeah, it's definitely a significant shift. The Xinfra component helps with Kafka compatibility, but that still has quite a bit of complexity to it. Also, it's written in C++, so that requires a different mindset to operate.

Re: What If We Could Rebuild Kafka from Scratch?

#146

Earlier quoted context omitted.

Check out the parallel consumer: https://github.com/confluentinc/parallel-consumer It processes unrelated keys in parallel within a partition. It has to track what offsets have been processed between the last committed offset of the partition and the tip (i.e. only what's currently processed out of order). When it commits, it saves this state in the commit metadata highly compressed. Most of the time, it was only pro…

Disclosure (given this is from Confluent): I'm ex MSK (Managed Streaming for Kafka at AWS) and my current company was competing with Confluent before we pivoted. Yup, this is one more example, just like Pulsar. There are definitely great optimizations to be made on the average case. In the case of parallel consumer, if you'd like to keep ordering guarantees, you retain O(n^2) processing time in the worst case. The is…

> traverse arbitrary dependency topologies

Is there another way to state this? It’s very difficult for me to grok.

> DAG

Directed acyclic graph right?

Re: What If We Could Rebuild Kafka from Scratch?

#147
post #61

Earlier quoted context omitted.

Also remember that NATS was donated to the CNCF a while back, and as a result people built a huge ecosystem around it. Easy to forget.

Relevant: https://www.cncf.io/blog/2025/04/24/protecting-nats-and-the-...

How to kill a project and blemish your brand?

Ding Ding Ding

That's correct!

Re: What If We Could Rebuild Kafka from Scratch?

#149

> Key-centric access: instead of partition-based access, efficient access and replay of all the messages with one and the same key would be desirable. I’ve been working on a datastore that’s perfect for this [1], but I’m getting very little traction. Does anyone have any ideas why that is? Is my marketing just bad, or is this feature just not very useful after all? 1. https://www.haystackdb.dev/

what can you do that redis can't?

I'm also skeptical of the graph on your front page that claims S3 cost as much as DynamoDB.

that alone makes it look like total nonsense.

as someone else said, extraordinary claims require extraordinary evidence.

Re: What If We Could Rebuild Kafka from Scratch?

#150
> You either want to have global ordering of all messages on a given topic, or (more commonly) ordering of all messages with the same key. In contrast, defined ordering of otherwise unrelated messages whose key happens to yield the same partition after hashing isn’t that valuable, so there’s not much point in exposing partitions as a concept to users.

The user gets global ordering when

1. you-the-MQ assign both messages and partitions stable + unique + order + user-exposed identifiers;

2. the user constructs a "globally-collatable ID" from the (perPartitionMsgSequenceNumber, partitionID) tuple;

3. the user does a client-side streaming merge-sort of messages received by the partitions, sorting by this collation ID. (Where even in an ACK-on-receive design, messages don't actually get ACKed until they exit the client-side per-partition sort buffer and enter the linearized stream.)

The definition of "exposed to users" is a bit interesting here, as you might think you could do this merge-sort on the backend, just exposing a pre-linearized stream to the client.

But one of the key points/benefits of Kafka-like systems, under high throughput load (which is their domain of comparative advantage, and so should be assumed to be the deployed use-case), is that you can parallelize consumption cheaply, by just assigning your consumer-workers partitions of the topic to consume.

And this still works under global ordering, under some provisos:

• your workload can be structured as a map/reduce, and you don't need global ordering for the map step, only the reduce step;

• it's not impractical for you to materialize+embed the original intended input collation-ordering into the transform workers' output (because otherwise it will be lost in all but very specific situations.)

Plenty of systems fit these constraints, and happily rely on doing this kind of post-linearized map/reduce parallelized Kafka partition consumption.

And if you "hide" this on an API level, this parallelization becomes impossible.

Note, however, that "on an API level" bit. This is only a problem insofar as your system design is protocol-centered, with the expectation of "cheap, easy" third-party client implementations.

If your MQ is not just a backend, but also a fat client SDK library — then you can put the partition-collation into the fat client, and it will still end up being "transparent" to the user. (Save for the user possibly wondering why the client library opens O(K) TCP connections to the broker to consume certain topics under certain configurations.)

See also: why Google's Colossus has a fat client SDK library.

Post reply on HN