Welcome! Log In Create A New Profile

Advanced

Re: How to disable buffering when using FastCGI?

Maxim Dounin
October 13, 2009 01:32PM
Hello!

On Tue, Oct 13, 2009 at 04:20:00PM +0200, Nicolas Grilly wrote:

> On Tue, Oct 13, 2009 at 13:19, Maxim Dounin <mdounin@mdounin.ru> wrote:
> > On Tue, Oct 13, 2009 at 12:17:05PM +0200, Nicolas Grilly wrote:
> >
> >> Is there a way to disable buffering when using FastCGI? (for a Comet
> >> style application)
> >>
> >> Is there an option "fastcgi_buffering off", working like the option
> >> "proxy_buffering off" in the HTTP proxy module?
> >
> > No, there is no such option.  Buffering can't be disabled for
> > fastcgi.
>
> Hello Maxim,
>
> Is there no such option just because nobody implemented it? Or is it
> because of some kind of technical constraint?

Something like this. FastCGI requires buffer processing which
isn't compatible with current code for unbuffered connections.

> Do you recommend to people developing Comet style application to use
> HTTP proxying instead of FastCGI?

For now you should either close & reopen connections, or use HTTP
proxy instead.

> Is it difficult to implement the option "fastcgi_buffering off", using
> the same technique as in the source code of module HTTP proxy?

Current "proxy_buffering off" implementation is something wierd
and should be nuked, IMHO. The same implementation for FastCGI
just won't work.

I believe buffering control in upstream module (which includes
fastcgi, proxy and memcached) should be changed to something more
flexible. In particular, fastcgi should be aware of FastCGI
record boundaries, and shouldn't try to buffer too much as long as
it got full record.

I've posted some preliminary patches for this as a part of backend
keepalive support work, but they are a bit stale now.

Maxim Dounin
Subject Author Posted

How to disable buffering when using FastCGI?

Nicolas Grilly October 13, 2009 06:26AM

Re: How to disable buffering when using FastCGI?

Phillip Oldham October 13, 2009 06:42AM

Re: How to disable buffering when using FastCGI?

Nicolas Grilly October 13, 2009 10:20AM

Re: How to disable buffering when using FastCGI?

Maxim Dounin October 13, 2009 07:24AM

Re: How to disable buffering when using FastCGI?

Nicolas Grilly October 13, 2009 10:26AM

Re[2]: How to disable buffering when using FastCGI?

Denis F. Latypoff October 13, 2009 10:52AM

Re: Re[2]: How to disable buffering when using FastCGI?

Nicolas Grilly October 13, 2009 02:18PM

Re: How to disable buffering when using FastCGI?

Maxim Dounin October 13, 2009 01:32PM

Re: How to disable buffering when using FastCGI?

Nicolas Grilly October 13, 2009 02:34PM

Re: How to disable buffering when using FastCGI?

Maxim Dounin October 13, 2009 03:50PM

Re: How to disable buffering when using FastCGI?

Nicolas Grilly October 14, 2009 08:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready