Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

Squeezing the firehose: getting the most from Kafka compression

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Ivan Babrou
Word Count
3,309
Company Posts That Month
30
Language
English
Hacker News Points
-
Post removed?
No
Summary

In order to reduce the size of messages being sent through Apache Kafka, we decided to implement compression algorithms. We started with Snappy, which is a fast compression algorithm that provides good compression ratio for many types of data. However, it was not enough to keep up with our ingress and egress rates. We then switched to Zstandard, which is a modern compression algorithm promising high compression ratio and throughput, tunable in small increments. We found that using Zstandard level 6 provided the best compromise between compression ratio and CPU cost for our data. By implementing these compression algorithms, we were able to reduce the size of messages being sent through Apache Kafka by up to 4.5x compared to no compression at all. This allowed us to improve our network and storage utilization significantly.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Serverless 6 180 28 15 -9%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.