fastcgi, simply wrong
Igor Sysoev
is at rambler-co.ru
Fri Apr 25 16:26:40 MSD 2008
On Fri, Apr 25, 2008 at 09:03:26AM -0300, Alexandre Girao wrote:
> On Fri, Apr 25, 2008 at 5:02 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> > Hello!
> >
> >
> > On Fri, Apr 25, 2008 at 01:11:26AM -0300, Alexandre Girao wrote:
> >
> >
> > > Hi folks,
> > >
> > > i've just dedicated some hours upon the nginx behavior/source code
> > > (version 0.6.29, but also happens to 0.5.35)
> > > towards fastcgi protocol and discovered that the requestId is fixed,
> > > it's simple always equal do 1, this break the
> > >
> >
> > Since nginx doesn't send more than one request within single connection to
> > FastCGI application - there is nothing wrong with requestId always being 1.
>
> ok, but my application (which btw works perfectly with
> lighttpd/apache) tracks request state based on the request id, just as
> specification says, if i change my application to track request states
> based on connection.. geee.. this is ugly
This simply means that your application does not conform to FCGI
specification. You should track request id AND connection.
Why do you think that if I will change nginx to conform your application
it will not be "gee.. ugly" ?
> > See http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S3.3 for details.
> > Quote:
> >
> > % The Web server re-uses FastCGI request IDs; the application
> > % keeps track of the current state of each request ID on a given
> > % transport connection.
> >
>
> the specification is not saying that the webserver can fix the request
> id, it simple says that after a request id is over (full life cycle)
> it can be reused, indeed, this just reinforces my previous paragraph..
> that i need to track request state based on the request id
>
> the spec says "the application keeps track of the current state of
> each request ID" not "the application keeps track of the current state
> of each transport connection"
Your cite is not complete: "the application keeps track of the current
state of each request ID on a given transport connection." This means
that two connections may have the same request id on the same time.
Actually, your FastCGI server may serve two different frontends those
have no idea about each other existance. They will use the same request id
range. How will you track their requests using request id only ?
nginx has no full FastCGI support. Yes, I agree completely.
But it conforms to the subset of FastCGI specs.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list