"Hacking" the event model of Nginx

François Battail fb at francois.battail.name
Sat Apr 12 22:44:30 MSD 2008

Manlio Perillo <manlio_perillo at ...> writes:

> If you need "speed", try my WSGI module.
> http://hg.mperillo.ath.cx/nginx/mod_wsgi/

First, thanks a lot for your reply. Well, I believe Python is a great language
but I will keep C (I was considering using assembly language!) because I will be
able to have *zero copy* between my database buffers and my xml to xhtml
translation, I already know where the bottleneck is and that's why I made this

> Give at look at:
> http://hg.mperillo.ath.cx/nginx/mod_wsgi/file/tip/src/ngx_wsgi.c
> row 850.

Well, I'm not too sure it's relevant to my case but I will investigate in depth;
thanks to share your knowledge.

> Is my_http_worker in a separate thread?
> Then this will not work, Nginx is not thread safe.

Yes there are separate threads launched for each Nginx worker process, it's not
an issue as a request is linked to a worker process, just a matter of mutex;
nothing to scare me! The mix using non preemptive model and worker thread is
very interesting but not so easy to do.

Thanks for your kind reply,

Best regards

More information about the nginx mailing list