← Back to team overview

openstack team mailing list archive

Push vs Polling (from Versioning Thread)

 

On 10/27/2011 10:36 AM, George Reese wrote:

#3 Push scales a hell of a lot better than having tools polling a cloud
constantly. It doesn't matter whether it is polling the API, polling a
feed, or polling a message queue. Polling is one of the most unscalable
things you can do in any distributed systems scenario. Calling it a feed
doesn't magically solve the problem. Actually, it's quite hard on its
own in an IaaS scenario and has scaling issues independent of the
polling issue.

I disagree. The web was designed specifically to solve the distributed scaling problem and it's based on HTTP polling. It scales pretty well. The argument against polling not scaling inevitably neglects using caching properly.

Push doesn't scaled because it requires the server to know about every client and track conversational state with them. If you need reliability, this requires persisting that conversational state. In order to allow this to happen you have to have some kind of registration protocol for clients. If some fraction of those clients are flaky, the conversational state tracking will kill you because each client consumes resources and so flaky clients = resource leak.

Push wins when you need very low latency delivery, high message throughput to individual consumers, or server side guarantees of delivery to individual consumers, but not for scaling to a large number of clients in a climate of an elastic infrastructure.

Push notifications are the only mechanism for solving the scaling issue.
You push any changes to a message queue. Agents pick up the changes and
send them on to subscriber endpoints. Not that hard.

Not that hard with a few fairly reliable clients. Very hard with a web scale set of unreliable clients while I simultaneously need to scale the back end.


Follow ups

References