xg1990 / GCP-Data-Engineer-Study-Guide

GCP-Data-Engineer-Study-Guide
117 stars 67 forks source link

Cloud Pub/Sub - push or pull #1

Open showenx opened 4 years ago

showenx commented 4 years ago

hi, The doc is a good summary for learning.

One question regarding the Cloud Pub/Sub,

In the Linux Academy doc, it states Push is low latency and more real time.

In your doc it states Pull is a more efficiency deliver/consume mechanism.

When you mentioning "more efficiency", are you referring the speed or the loading size?

https://www.lucidchart.com/documents/view/0ca44a63-4ea4-4d78-8367-2465512d21be/3AODklWf9ayD

mehdihasan commented 1 year ago

I think Push is low latency and more real time - is off-course right.

There are some cases you can use both of the options - in that case push would be my preferable option if my application can able to handle that. Cause in case of varying throughput - my application should have the elasticity to handle the push load.

In some cases, pull is more preferable. For example you have your application in premises and you do not have any option to have any external exposer of your system. Also, in case if you have a constrained resource given against your application, and not have elasticity - pull is preferable option.