Reputation: 411
We are working on the project where we wish to use Kafka. Based on our learning we have few queries:
Reference URL: https://www.youtube.com/watch?v=BGhlHsFBhLE#t=40m53s
In multiple nodes multiple brokers architecture, can consumer read from in-sync follower?
Any Kafka documentation links that gives us a walk through around such an architecture?
Kafka says that ”Producers and Consumers both write to and read from the LEADER replica and Follower replica is a High Availability solution and not meant to be read data from” In this case, how does a same TOPIC be read from multiple brokers? Any documentation / reference links that can help me how this can be achieved?
If the concept of “LEADER / FOLLOWER” is at the partition level and topics reside within a partition, then how can a topic be read from multiple brokers (as the replication on other brokers will be a FOLLOWER replica – from which data cannot be read)?
Upvotes: 1
Views: 1839
Reputation: 3405
No consumers must read just from partition leader. Replication is just for fault tolerance.
Topic is divided to partitions. Partition is a basic unit of replication and distribution. Each partition has its own leader for read and writes. You can specify layout how those partitions should be distributed across brokers.
Check out following short blog describing basic concepts.
Upvotes: 1
Reputation: 62285
Also check out this blog post about partitions and replication in Kafka: http://www.confluent.io/blog/hands-free-kafka-replication-a-lesson-in-operational-simplicity/
Upvotes: 2