mod_wsgi

Igor Sysoev is at rambler-co.ru
Wed Aug 15 00:55:45 MSD 2007


On Tue, Aug 14, 2007 at 10:32:50PM +0200, Manlio Perillo wrote:

> Igor Sysoev ha scritto:
> >On Tue, Aug 14, 2007 at 07:46:24PM +0200, Manlio Perillo wrote:
> >
> >>Are there any plans for the development of mod_wsgi for nginx?
> >
> >No, I have no plan to support WSGI or SCGI in observable future.
> >
> 
> Since it is a related question:
>   - are there any issues about mod_perl?

   Do you mean ngx_http_perl_module ? Yes:

1) do not use $r->XXX values in number context:

   my $i = $r->variable('counter') + 1;

   use

   my $i = $r->variable('counter');
   $i++;

2) $r->XXX values do not have terminating '\0',
   exceptions are r->filename and $r->request_body_file.
   So use

   my $path = $r->variable('name');
   open FILE, $path;

   or

   open FILE, '/path/' . $r->variable('name');

3) if perl was built without multiplicity interpreters, then it will
   not recompile external modules

   see

   perl -V:usemultiplicity
   usemultiplicity='define';

4) perl code should not do long blocking operations, i.e. connect, read,
   DNS resolving, etc.

However, I plan to add special method to $r->connect()/$r->read()/$->write()/
$->resolve() and non-blocking operations with MySQL and PostgreSQL.

>   - if all worker processes are blocked on a request,
>     can nginx still work properly
>     (as an example returning a 503, or limiting the number of concurrent
>      requests)?

No, nginx simply will not get control from perl.

>   - any problems in having a large number of worker processes?

OS scheduling and CPU cache trashing. As usual in large number of processes.

>   - is it possibile to extend nginx to spawn an additional worker
>     process if required?

Yes.

>   - do you plan to add full command line support for nginx
>     (so one can run nginx without having to use a configuration file)?

No.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list