Emanuele Sabellico retweeted
Tired of Apache Kafka client parity drift?
Our native Rust Client is now generally available and it’s aligned with the Java client.
Same configs, same rebalance semantics, and no system library install needed.
See how it works: ibm.co/6018EnHQy
Emanuele Sabellico retweeted
Really excited to be joining forces with the Warpstream team! Awesome people and a fantastic product.
BYOC 🤝 Confluent
🎉We’re excited to share that we acquired @warpstream_labs!
Now, our customers can get streaming data any way they need it – self-managed, fully managed, or bring your own cloud (BYOC).
Get the full scoop in @jaykreps’ blog → cnfl.io/3ZjKt3o
Emanuele Sabellico retweeted
Everyone is using Kafka.
But almost no one is using its new Infinite Storage feature. ✨
KIP-405 is introducing the ability to store Kafka data in S3.
And any other external store for that matter.
It’s incredibly needed, because storage is Kafka’s biggest flaw right now.
❌
Kafka was not originally developed with elasticity in mind.
It’s key limitation is that it co-locates the data with the broker, resulting in many problems:
1. Competition for disk IOs ⚔️
Historical consumers can decrease write performance by up to 43% (as shown in the tests below) because they force Kafka to read from the disk (as opposed to its page cache) and that causes extra disk strain.
This is especially bad for HDDs, which have notoriously improved exponentially in all aspects BUT their IOPS capacity. 👎
They have been stuck at roughly 120 IOPS for the last two decades - so you can’t allow that precious IOPS to be used up… without expecting catastrophic latencies that is.
2. Speaking of HDDs - Kafka is practically REQUIRED to use them due to their cost-effectiveness. 💾
But they can give you large tail latencies.
With tiered storage, you can afford very fast small local SSD storage. ⚡️
This also means you can provision less memory because you don’t need to be as reliant on page cache for serving historical reads. 💡
Previously, you’d be reliant on it so that you reduce hits to the disk in historical read scenarios which result in prolonged periods of under-replicated partitions, and extra network bandwidth of the cluster being used up.
3. Disastrous broker disk failure scenario - in such cases, the broker has to re-fetch everything it had on disk (TBs).
This sudden extra historical read traffic at max allowed throughput severely impacts latencies.
Such broker start up scenarios can be 12,000% slower and can worsen produce latencies by up to 900%, as shown by tests below. 😱
4. Slow broker failure recovery - if a broker simply restarts for whatever reason (e.g host VM died), it has to catch up with a lot of data, proportional to the time it was dead.
This again exhausts precious IOPS, causes extra bandwidth and just generally takes slower to resolve under-replicated partitions. 🐌
5. Reassigning partitions - partitions that have a lot of data are extremely slow to move.
At a decent 100MB/s replication rate, 10TB of data moves at a whopping 27.7 hours! That’s more than one day!
In the intermediate state, this means you're replicating 2x as much data for 28 hours. 🤦🏻♂️
This means that any actions like expanding or shrinking a cluster will realistically take you days to finish, while also consuming a TON of extra replication bandwidth. It's a real disaster.
And finally - you can never effectively rebalance partitions in a reactive way to resolve any problem fast. (since fast isn't measured in hours) 👎
6. Impractical to scale storage 😮💨
If you decide to increase your retention settings across the cluster for whatever reason (e.g GDPR), you either need to:
• scale horizontally: add new brokers and waste unnecessary CPU/memory resources)
• scale vertically: do some complex and fragile disk swaps on them
7. Your cluster set up ends up impacted by disk requirements 😠
You end up with a significantly larger cluster than you would need if disk size wasn’t a concern. i.e you’re buying extra CPU/memory you don’t need. 👎
This is because HDDs have limited size - so there are cases where you may need to use extra machines just so you can place more HDDs in there.
Not to mention the extra maintenance burden for supporting more nodes.
8. High cloud cost ☁️ 💸
In the cloud, it’s more expensive to provision larger disk volumes that are attached to the instance.
9. Max storage limitation per partition 🛑
You’re limited by how much data you can store on a single partition based on the limit of the physical disk on the broker.
While admittedly a very niche use case, why couldn’t you have a single partition that consists of terabytes of historical data?
Those are a lot of problems...
How do we solve all of this? 😥
Simple. Put the data in S3 ✨
That is what Tiered Storage is - it extends Kafka’s storage beyond the local one by retaining the data in a pluggable external store (HDFS, S3, etc).
Pluggable is a key word here, as it will enable the open-source community to develop different implementations for different external stores in parallel. This can be implemented via the RemoteStorageManager interface.
Kafka will end up having TWO tiers of storage placement:
1. a local one (hot) 🥵
2. a remote one (cold) 🥶
You will be able to enable this uniquely per topic, with varying local and remote retention settings.
This will be done transparently to any clients - they won’t be able to tell when they’re fetching from the remote store as the Kafka API remains the same and simply abstracts it away.
😡 Won’t this kill latency?
In theory, one should expect slower reads from the remote log store.
But. This isn’t a problem practically as historical workloads are usually not performance sensitive. 💡
The latency-sensitive workloads usually read from the tail of the log (latest data), and are therefore not impacted by this feature.
Performance tests were done nevertheless! (using HDFS as the external system)
They focused exclusively on write latency and the impacts there:
• The largest produce latency increase in the tests was 21ms → 25ms of p99 produce latency in the steady state.
With different scenarios came different results.
Get this - when there are historical reads (out of sync consumers), the produce latency was actually improved! 🔥
This is because without tiered storage, consumers reading old data compete for IOs on the disk for reading (normal consumers don’t since data is served from pagecache).
This reduces the IOs that writes can get and write disk latency increases. ❌
The tests showed 42ms of p99 produce with tiered and 60ms of p99 produce without tiered storage in this historical consumer scenario - a 28% latency decrease.
And the heavy-hitter final case - rebuilding a broker with an empty disk.
For just 12TB of data, recovery took almost 4 hours in their test without tiered storage, and only 2 minutes with tiered storage (a 120x improvement).
During this broker recovery, the p99 produce latency was 490ms without tiered and 56ms with tiered - a 9x improvement!
Most importantly?
This completely flips the script and enables Kafka to be used as a true long-term store.
This is strongly in opposition to its most widely-used use-case today, which is a durable but ultimately ephemeral storage - akin more to a pipe than anything else. 🪈
Lakehouses are all the buzz today, but has anybody pondered about what a Streaming Lakehouse might look like? 🤔
--
Let's be frank... is there any place with better Kafka content on the internet right now?
If you like this and want to see more, help me out in two ways:
1. Repost so your network learns too! 💥
2. Follow me here for more high-quality Kafka content - ✅ @kozlovski
They take 10 seconds to do - writing this takes me 10+ hours. ✌️
#Kafka #ApacheKafka
Emanuele Sabellico retweeted
The real Chinese hack was not TikTok, but hijacking projects maintained by unpaid volunteers.
The US supply chain resilience funds should be invested in a Job Guarantee like system to safeguard this critical infrastructure.
We barely dodged this bullet.
Emanuele Sabellico retweeted
Apache Kafka 3.7.0 was just released! 🔥
What comes with this new release?
Here are the top features you should know about:
(2-minute read) 🧵
Emanuele Sabellico retweeted
Something amazing is coming to Apache Kafka…
Consumer Groups v2!
If you’ve ever used consumer groups in production at any non-trivial scale, you probably know all the problems with it:
- ⛔️ Group-wide synchronization barrier acts as a cap on scalability
A single misbehaving consumer can disturb the whole group.
Even if you have cooperative rebalancing and static membership enabled, you will still have rebalances happen. 🤷♂️
It’s a fact of life I've heard - death, taxes & consumer group rebalances.
And the problem is that even with cooperative rebalancing (which helped a lot!), you’re bound on waiting for the slowest member of the group to complete the rebalance(s). 🐌
The problem is that no consumer can commit offsets while a rebalance is in progress. ❌
Another subtle thing is that with cooperative rebalancing, a rebalance will take longer than usual.
Why?
Because consumers are allowed to process partitions during rebalances.
They will call the poll() method more infrequently -- they're busy processing records after all.
Thus, the overall rebalance time will increase.
This makes it pretty hard to scale to 1000s of members.
- 🤯 Complexity
There’s a reason you’re reading this!
The current protocol is pretty complex and hard to understand. It's used for a bunch of stuff, including metadata propagation in Kafka Streams.
This compexity results in more:
- 🐛 bugs
The harder to reason about and the more moving parts
you have - the greater chance for bugs.
There have been quite a few in the protocol.
And due to the fact that a lot of the protocol’s logic lives on the clients, that results in:
- 🐌 slow fixes
Bugs require client-side fixes, which are slow to be adopted.
If you run a Kafka ops team, you know how hard it is to get all of your clients' teams to upgrade!
If you're using a cloud service, you need to wait for a new Kafka release to go out.
Can't have the cloud provider handle it for you behind the scenes!
- 🔍 hard to debug
Debugging is harder because you need client logs. In the cloud, that's hard to do again.
On-prem, it requires reading through a lot of logs and collecting a lot of files.
- ⚙️ very extendable
There’s a reusable embedded protocol within the rebalance protocol, where clients are free to attach raw bytes that only they can then parse themselves.
It's challenging to build compatible software for this cross-client protocol, as well as near-impossible to inspect from the broker side.
- 😢 inconsistent metadata
Clients are responsible for triggering rebalances based on the metadata, but different clients can have different views of the metadata.
- 😵💫 interoperability
Different implementations of the clients (i.e. anything besides the Java client) may have bugs.
The complex logic needs to be re-implemented quite a few times.
This usually means more bugs and slower time to ship features in your favorite client. A combination nobody likes.
...
So what should an open source community do?
Move the logic to the broker!
Then?
Simplify it.
The new protocol is very elegant - it streamlines all of the regular Kafka consumer logic inside a new heartbeat API.
It has the broker decide what partition assignments the consumers should have, and totally omits the notion of a Group Leader client.
Another major change is that the notion of a group-wide rebalance is removed now.
The rebalance is more fine-grained now. 👌
When you think about it, a rebalance is simply a reassignment of some partitions from some consumers to others. 💡
Why does the whole group need to stop and know about this?
It had to before because the logic was on the client.
It doesn’t now. 🎂
The new protocol is fine-grained in its assignments.
It maintains per-member epochs, as well as separate epochs for the general group membership and the global assignment.
The goal is simple - get all of those epoch numbers to be the same.
The order is the following:
1. the group-wide epoch is bumped.
2. the target assignment epoch is bumped.
3. individual consumers catch up to the epoch via the heartbeat request, individually. (fine-grained)
In general, what you have is a simple state machine inside the Group Coordinator broker that’s running a constant reconciliation loop. 💥
Because every member converges to the target state independently, the coordinator is free to simplify that convergence member by member. 👍
It has the logic to resolve dependencies between members - the act of:
1. revoking one member’s partition.
2. confirming the success of that.
3. bumping that member's epoch before assigning that partition to another consumer.
Here is an example visual of what happens when two members join a consumer group one by one:
Emanuele Sabellico retweeted
Redpanda bring out benchmark after benchmark claiming performance superiority over Apache Kafka. I decided to run my own tests to see if any of it was true.
jack-vanlightly.com/blog/202…
Emanuele Sabellico retweeted
#Apache #Kafka #Python client confluent-kafka-python v2.0.2 released!
Includes Python 3.11 wheels and bindings for new Admin API for consumer groups. Check v2.0.2 release notes for the full list of changes.
github.com/confluentinc/conf…
@confluentinc
Emanuele Sabellico retweeted
Replying to @confluent
@confluent's .NET Kafka client v1.9.2 is out. Features a pre-packaged librdkafka build for Apple silicon and expanded AdminClient API - ACL operations thanks to @emasab + DeleteGroups. github.com/confluentinc/conf…
Emanuele Sabellico retweeted
I love the Russian people. That is why I have to tell you the truth. Please watch and share.
Emanuele Sabellico retweeted
This is one of the Top 10 most prolific contributors to the Python programming language. He contributed more code than any currently sitting Steering Committee member. His life is in danger.
There is no "keeping politics out of programming", tech consists of real people.
Emanuele Sabellico retweeted
.@ZelenskyyUa's tv address to the Russian (!) people might be the most moving speech that I've ever seen in my entire life. The whole world needs to see, understand and share this crucial Ukrainian message.
#StandWithUkraine #Ukraine #Україна #Russia #Россия
President Zelenskyy's speech to the Russian people
Ukrainian President Volodymyr Zelenskyy's plea to the Russian people in video remarks posted early on Feb. 24 local time with English subtitles.
Emanuele Sabellico retweeted
This is probably the most succinct argument against crypto to send to people who aren't already bought into the scam. Very well stated.
watershed.co.uk/studio/news/…
Emanuele Sabellico retweeted
Occam xkcd.com/2541
Emanuele Sabellico retweeted
This is AI at its best: helping humans do science faster and more effectively.
Today with @emblebi, we're launching the #AlphaFold Protein Structure Database, which offers the most complete and accurate picture of the human proteome, doubling humanity’s accumulated knowledge of high-accuracy human protein structures - for free: dpmd.ai/alphafolddb 1/
Emanuele Sabellico retweeted
Big advances in #AI
1. Generating chips (TPUs) in hours that would take humans months
nature.com/articles/s41586-0…
2. GANs for unannotated medical images
nature.com/articles/s41551-0…
3. Deconstructing human decision making
science.sciencemag.org/conte…
Emanuele Sabellico retweeted
I have an idea for a data structure, hear me out.
A linked list where every node contains a hash of all the data in the nodes behind it, and every time you want to add a new node, you need about 200.000 other computers to say ok and consume the power equivalent of a small nation
Emanuele Sabellico retweeted
Today I witnessed history. Now you can too. You’re watching video of the #MarsHelicopter’s first flight – a true “Wright brothers” moment.
Watch it all unfold:
✅ Spin-up
✅ Takeoff
✅ Hover
✅ Turn
✅ Landing
Read more: go.nasa.gov/3edNn0u
First Video of NASA’s Ingenuity Mars Helicopter in Flight (High-Res)
Emanuele Sabellico retweeted
Eradication xkcd.com/2448
































