Top 10 Kafka Problems
Top 10 Kafka Problems
com/blog/top-10-problems-when-using-apache-kafka/
Top 10 Problems When Using Apache Kafka
Apache Kafka is one of the most popularly used open-
source(https://opensource.com/resources/what-open-source) distributed event
streaming platforms. Its use cases range from enabling mission-critical apps to
building and maintaining high-performance data pipelines. If you consider whether
to use Apache Kafka for your future projects, you should know all about the pros
and cons of using it. In today’s article, we will stick to the cons. While Apache
Kafka is a solid distributed messaging platform, it has some limitations. To paint
the picture, we have put together the top 10 problems when using Apache Kafka.
A spike in data volume causes the Kafka broker to back up message conversion.
However, the problem has to be addressed as soon as possible. Usually, the
questionable broker has to be fixed for the entire system to be operational again.
Why? Because you need to enable liveness check to streamline automation and
make sure that the broker’s client-serving port is open. You can simply write a
piece of code to restart the broker when the port is not open. But if the broker
falls into a dead-loop and keeps restarting, your entire infrastructure is rendered
useless. Is there a quick fix? Simply turn off the liveness check.
The broker can work properly before the partition reassign process is
completed. Devs usually forget about it and use the default commands from the
documentation. Moving thousands of partitions to the staging cluster can take
hours. And, until all the partitions have been moved, its performance will suffer.
This is why you should be careful and have a plan when you want to add a new broker
to the infrastructure.
The best solution would be to use Kafka only for storing data for a brief
period and migrate data to a relational or non-relational database, depending on
your specific requirements.
5. Finding Perfect Data Retention Settings
While we are discussing long-term storage solution
problems(https://pandio.com/blog/zero-data-loss-a-reality-in-apache-pulsar-not-
true-with-kafka/), let’s point out one additional issue related to it. The
downstream clients often have completely unpredictable data request patterns. This
makes finding the perfect and most optimal data retention settings somewhat of a
problem.
Kafka stores messages in topics. This data can take up significant disk space
on your brokers. To dump the data, you need to set the retention period or
configurable size. If you don’t tune the data
retention(https://pandio.com/blog/pulsar-with-pandio-dont-use-apache-kafka/)
settings correctly, you risk either rendering data useless or paying way too much
for storage than you should have to in the first place.
Even with Kafka Stream API, you will have to spend days building complex data
pipelines(https://pandio.com/blog/challenges-building-big-data-pipelines/) and
managing the interaction between data producers and data consumers. Not to mention
having to deal with and manage a system this complex. There are other distributed
messaging systems that are much better for streamlining
ETL(https://pandio.com/blog/what-is-etl-benefits-challenges-recent-advances/) jobs,
such as Apache Pulsar.
You will have to do it every time a major change in the data stream occurs.
And do it both via partition leadership balancing and Kafka reassign partition
script. At the same time, with stateless brokers, Apache Pulsar makes the scale-out
process (https://pandio.com/blog/how-apache-pulsar-solves-kafkas-scalability-
issues/) significantly easier.
Manipulating data on the fly is possible with Kafka, but the system it uses
has some limits. It uses system calls to do it, and modifying messages makes the
entire platform perform significantly slower.