Why is Kafka pull-based instead of push-based?

前端 未结 3 2205
自闭症患者
自闭症患者 2020-12-23 19:54

Why is Kafka pull-based instead of push-based? I agree Kafka gives high throughput as I had experienced it, but I don\'t see how Kafka throughput would go down if it were to

3条回答
  •  忘掉有多难
    2020-12-23 20:25

    Refer to the Kafka documentation which details the particular design decision: Push vs pull

    Major points that were in favor of pull are:

    1. Pull is better in dealing with diversified consumers (without a broker determining the data transfer rate for all);
    2. Consumers can more effectively control the rate of their individual consumption;
    3. Easier and more optimal batch processing implementation.

    The drawback of a pull-based systems (consumers polling for data while there's no data available for them) is alleviated somewhat by a 'long poll' waiting mode until data arrives.

提交回复
热议问题