Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions on nginx, ngx_zeromq and uwsgi #3

Open
pcdinh opened this issue May 9, 2012 · 2 comments
Open

Questions on nginx, ngx_zeromq and uwsgi #3

pcdinh opened this issue May 9, 2012 · 2 comments

Comments

@pcdinh
Copy link

pcdinh commented May 9, 2012

Hi,

I has one of our servers powered by nginx, uwsgi and Bottle WSGI framework for a while now. The deployment model is as follows:

request --> nginx + uwsgi plugin (port 80/HTTP protocol) ---> (forward) --> uwsgi web server (port 8080/uwsgi protocol)---> WSGI app

I learn from this project that this plugin can speak in uwsgi. What does it mean?

  1. nginx parses HTTP packets (header + body) into uwsgi packets and push them to zeromq-based queue. uWSGI must some ways to pick messages from that queue
  2. nginx parses HTTP packets (header + body) into uwsgi packets and push them to zeromq-based queue. There is a built-in process picks messages from that queue and push them to uwsgi server.
  3. nginx parses HTTP packets (header + body) into uwsgi packets and push them to zeromq-based queue. Developer write uwsgi-aware workers that pick messages from that queue, parse that piece of information into WSGI friendly values and handle it

Thanks

Dinh

@pcdinh
Copy link
Author

pcdinh commented May 9, 2012

I read a document on uWSGI wiki page on how to configure uWSGI to run with ZeroMQ http://projects.unbit.it/uwsgi/wiki/Mongrel2

Will try it tonight

Thanks

@PiotrSikora
Copy link
Contributor

Sorry for the late response.

  1. nginx parses HTTP packets (header + body) into uwsgi packets and push them to zeromq-based queue. uWSGI must some ways to pick messages from that queue

That's the correct interpretation. Having said that, I don't believe that uWSGI is capable of receiving such messages right now (it supports receiving Mongrel2 messages, so changes required to support that would be trivial - it just isn't there yet).

  1. nginx parses HTTP packets (header + body) into uwsgi packets and push them to zeromq-based queue. There is a built-in process picks messages from that queue and push them to uwsgi server.

No, that would be pointless.

  1. nginx parses HTTP packets (header + body) into uwsgi packets and push them to zeromq-based queue. Developer write uwsgi-aware workers that pick messages from that queue, parse that piece of information into WSGI friendly values and handle it

Uhm, the whole concept behind this being content-agnostic is that it sends exactly the same data, just over ZeroMQ instead of TCP, so nothing new (in terms of parsing) is required.

I read a document on uWSGI wiki page on how to configure uWSGI to run with ZeroMQ
http://projects.unbit.it/uwsgi/wiki/Mongrel2

Yeah, that won't work - ngx_zeromq doesn't implement Mongrel2 protocol, it's still uwsgi protocol, just sent over ZeroMQ instead of TCP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants