简体   繁体   English

将Kafka用作Flink的输入源是否会成为性能瓶颈?

[英]Is using Kafka as an input source for Flink a performance bottleneck?

Flink允许阅读Kafka主题,这是性能瓶颈使Flink整体变慢吗?

Kafka partitions can scale horizontally to accomodate for higher thoughput. Kafka分区可以水平缩放以适应更高的吞吐量。

One Flink consumer thread can only be assigned to one Kafka partition. 一个Flink使用者线程只能分配给一个Kafka分区。

So, if you have only 1 Kafka partition, and N+1 Flink executors, then you will have N idle tasks, which could be a bottleneck, sure, but that is a tradeoff of having total-ordering within a Kafka topic, not necessarily a Flink problem. 因此,如果您只有1个Kafka分区,并且有N+1 Flink执行程序,那么您将有N空闲任务,这肯定是一个瓶颈,但这是在Kafka主题内进行总排序的折衷方案,不一定Flink问题。

Otherwise, you would create your Kafka topics with ten to hundreds of partitions, and Flink would be fine to consume it. 否则,您将创建具有十到数百个分区的Kafka主题,而Flink可以使用它。

It depends. 这取决于。 If, for example, you have a slow network connection between your Kafka cluster and your Flink cluster, then that will become a performance bottleneck. 例如,如果您的Kafka群集和Flink群集之间的网络连接较慢,则这将成为性能瓶颈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM