Kafka Architectures Notes
Kafka Architectures Notes
Table Of Contents
show
Introduction and Trends
Kafka Architecture
Kafka Cluster Architecture
Fundamental Concepts of Kafka Architecture
o Kafka Topics
o Partitions in Kafka
o Topic Replication Factor in Kafka
o Consumer Group
Advantages of Kafka Architecture
Disadvantages of Kafka Architecture
Conclusion
Additional Resources
The four key APIs of the Apache Kafka distributed streaming platform is the
Producer API, Consumer API, Streams API, and Connector API. In addition to
offering redundant storage of massive data volumes, the Connector API and
its features such as a message bus capable of throughput reaching millions of
messages per second are capable of processing streaming data from real-
time applications. In this Kafka tutorial, we’ll discuss the Kafka architecture.
We will discuss API in Kafka. We will also learn about Kafka brokers, Kafka
consumers, zookeepers, and producers. We will also get to know some
fundamental Kafka concepts.
Apache Kafka’s architecture is, in fact, simple, albeit for a reason: It eliminates
the Kafkaesque complexities that often accompany messaging architectures.
The intent of the architecture is to deliver an easier-to-understand method of
application messaging than most of the alternatives. Kafka is known for being
a fault-tolerant, fault-diffusional scalable log with a very simple data design.
Kafka Architecture
The producer API, the consumer API, the streams API, and the connector API
are the four core APIs in the Apache Kafka architecture. We will discuss them
one by one:
The diagram provides information about the cluster structure of Apache Kafka:
Kafka Broker: When maintaining the state of the cluster, the Kafka cluster
typically uses ZooKeeper. However, these are stateless brokers, so keeping
the cluster state is a stateful task. Despite the fact that one Kafka Broker
instance can handle hundreds of thousands of reads and writes per second,
keeping the cluster state is a stateful process.
While the Kafka producer hands out messages as fast as the broker can
process them, it does not wait for acknowledgments from the broker.
Kafka Consumers: The main advantage of partition offset is that the Kafka
Consumer keeps track of how many messages have been consumed by
keeping track of the partition offset. In addition, you can ensure that the
consumer has consumed all prior messages by acknowledging every
message offset.
Kafka Topics
Partitions in Kafka
Partitions and also replicated across brokers are employed to divide up Topics
in a Kafka cluster.
Consumer Group
1. An exception to the rule is that Apache Kafka does not come with a
complete set of monitoring and management tools. Because of this,
new ventures or enterprises avoid using Kafka.
2. A message being tweaked by the Kafka broker requires system calls. In
case the message needs some work, its performance of Kafka is
reduced. So, it is advisable to keep the message the same.
3. Apache Kafka does not permit wildcard topic selection. Instead, it
applies only the exact topic name. The reason for this is that ignoring
wildcard topics is unable to meet certain demands.
Apache Kafka Notes
4. The reduction in the data flow caused by brokers and consumers
padding and decompressing the data flow affects its performance as
well as its throughput.
5. When there are more than one Kafka Queue in the Kafka Cluster,
Apache Kafka can be a bit clumsy.
6. Some message paradigms, such as point-to-point queues,
request/reply, and so on, are absent from Kafka for certain use cases.
Conclusion
We discussed Kafka’s architecture earlier in the post. We also saw the Kafka
components and basic concepts. We also saw a brief description of Kafka’s
brokers, consumers, and producers. We also mentioned Kafka Architecture
API in this post. If you want to know more about Kafka’s Architecture, please
read the official documentation.