Hi everyone, can someone confirm my understanding ...
# troubleshooting
a
Hi everyone, can someone confirm my understanding of
SplitEnumerator
, specifically for Kafka sources. I see that it runs on job manager and round-robins to task managers. Does it mean that we might be bottlenecked by the job manager process and there isn’t a way to increase number of kafka partitions and make the reading/load balancing faster? Has anyone run into a limitation like this? Thanks!
Reading is done by TaskManagers, not by the JobManager
k
Generally speaking (not for Kafka Source), the TaskManager could be a bottleneck if Split discovery and split creation logic would be an overwhelming task.
If Im correct, for Kafka Source Split = Kafka topic, so for Kafka Source Split is just a "descripor" of a topic, that is send to readers. Kafka Source can discover new partitions (craete new Splits) I dont think this could cause significatn delays in this case
a
Oh apologies, I think I had a conceptual misunderstanding when I checked the diagram here: https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/#data-source-concepts And I thought the round-robin here meant that the actual data was being load balanced. Then I think it means that one Kafka partition is a split in Flink and which task manager reads what split is decided by the JobManager, is that correct?
m
A split at Kafka is actually a partition IIRC
I can see how that can be confusing yes
a
I think I didn't pay close attention to the docs, apologies 😅 Does my current understanding make sense? Therefore, is it safe to assume that we can't have more TaskManagers reading from a topic than the number of partitions in that topic?
You can have more TaskManagers: they won’t be reading from a Kafka partition in that case
a
Right, thank you for the explanation! 🙏
t
@Martijn Visser I have a quick follow up regarding your last comment, Is it possible to extend SplitFetch to use 2 task managers to poll 1 kafka partition concurrently with different offset range?
m
@Take Care I don't think so, because I could see that cause correctness issues when you need to restore from a snapshot