Push Vs Pull

Pull base

Pasted image 20230902114405.png

  • Pull is better when dealing with diversified consumers.
  • Pull consumer can effectively control its own rate of consuming
  • Easier and more optimal for batch processing
  • Pull consumer no need to keep the connection
  • Draw back: keep polling when there is no data.
    • We can introduce long-polling waiting mode until data arrives

Push base

Pasted image 20230902114141.png

  • Need to keep the connection
  • have different push types
  • harder to scale

For pull-based: Kafka
For push-based: RabbitMQ