> Me being ignorant. What is the difference between using nginx push
> module and simply proxying nginx to a gunicorn running with eventlet
> worker so coroutines used instead of threads. Or is the push module a
> special variant of proxy module that is friendly to long polling
> backends and doesn't drop connection on every backend request?

One benefit of that push module is that you can use it with any
language (that can make a POST http request).

The other benefit is that it's a very simple push/sub module (it
supports several semantics) so you wont need to implement that in
python yourself.

The third benefit is that you get the scalability of nginx, which I
guess would be a bit better than python + gevent/eventlet/gunicorn.


Of course, if the needs of your app are not satisfied with the push
module, gevent/eventlet/gunicorn/etc would be better suited - since
you can implement any semantics you want.


BTW,
The GET requests to the push module are not propagated to your
backend. Those are just long-polled inside nginx to establish the
backchannel. Every GET request has an ID query argument and is sent to
a SUB url.

When you POST to the PUSH url with the id (from your backend, or even
from the public web - but that's not advisable), every GET on the same
id will receive the message.

Also, you can make it, cache the last messages, and clients can use
date headers to get older messages. Also the number of GET (sub)
clients is configurable (1 or unlimited).

--
damjan

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to