Long-Polling, WebSockets, Server-Sent Events, Queue-based subscription.
Q: Say service A want to get the status of a job that is run by service B. What are the pros and cons of using push or pull mode?
A: In general, pull mode means that you could have a lot of useless requests, which could overload the server.
Q: What are popular communication protocals between client with web browsers
|Ajax Polling||Repeatedly polls (or requests) a server for data.|
|Web sockets||Full duplex communication channels over a single TCP connection|
|Server-Sent Events (SSEs)|
With Long-Polling, we expects to see the server may not respond immediately when no data. That’s why this technique is sometimes a.k.a “Hanging GET”.
Q: For monitoring systems, compared to typical push mode, what are the advantages of Prometheus pull model?