# FastCGI and pipelining

**URL:** <https://www.ruby-forum.com/t/fastcgi-and-pipelining/217611>\
**Category:** NGINX\
**Created:** [March 6, 2012, 6:05pm UTC](https://www.ruby-forum.com/t/fastcgi-and-pipelining/217611 "2012-03-06T18:05:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 6, 2012, 6:05pm UTC](https://www.ruby-forum.com/t/fastcgi-and-pipelining/217611/1 "2012-03-06T18:05:27Z")

</div>

Hi all,

I’m recently start using NGINX in combination with my FastCGI service,  
it work quite good and effective.  
I decided to use pipeline as it works effectively utilizing one  
connection.  
According to NGINX logs pipelining is work, but I mentioned interesting  
thing - NGINX passes request to FCGI in synchronous mode, i.e. it’ll  
send the next request only after the first one will complete.

It’s weired for me.

Is such behavior is expected?

Maybe I miss some critical parameter in configuration?

PS. NGINX v1.1.14.

Thanks,  
Denis.

Posted at Nginx Forum:

> **[FastCGI and pipelining](https://forum.nginx.org/read.php?2,223522,223522#msg-223522)**
>
> Hi all, I'm recently start using NGINX in combination with my FastCGI service, it work quite good and effective. I decided to use pipeline as it works effectively utilizing one connection. According to NGINX logs pipelining is work, but I mentioned...

---

<div class="post-metadata">

**Author:** ![chuda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@chuda](https://www.ruby-forum.com/u/chuda)\
**Post date:** [March 6, 2012, 6:53pm UTC](https://www.ruby-forum.com/t/fastcgi-and-pipelining/217611/2 "2012-03-06T18:53:15Z")

</div>

Hello!

On Tue, Mar 06, 2012 at 12:04:35PM -0500, chuda wrote:

> It’s weired for me.
> 
> Is such behavior is expected?

Yes. Pipelined requests from client are processed in order. That  
is, processing of next request starts only when previous requests  
was handled and response sent (at least to socket buffer).

Maxim D.

---

<div class="post-metadata">

**Author:** ![chuda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@chuda](https://www.ruby-forum.com/u/chuda)\
**Post date:** [March 6, 2012, 10:51pm UTC](https://www.ruby-forum.com/t/fastcgi-and-pipelining/217611/3 "2012-03-06T22:51:51Z")

</div>

Maxim D. Wrote:

> Yes. Pipelined requests from client are processed  
> in order. That is, processing of next request starts only when  
> previous requests was handled and response sent (at least to socket  
> buffer).

Thank you for fast response.  
Is it common approach how NGINX serves pipelined requests to any  
upstream module or FCGI specific?

Is there any technique to speed it up?

Denis.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,223522,223538#msg-223538](http://forum.nginx.org/read.php?2,223522,223538#msg-223538)

---

<div class="post-metadata">

**Author:** ![chuda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@chuda](https://www.ruby-forum.com/u/chuda)\
**Post date:** [March 6, 2012, 11:38pm UTC](https://www.ruby-forum.com/t/fastcgi-and-pipelining/217611/4 "2012-03-06T23:38:28Z")

</div>

Hello!

On Tue, Mar 06, 2012 at 04:51:12PM -0500, chuda wrote:

> Maxim D. Wrote:
> 
> > Yes. Pipelined requests from client are processed  
> > in order. That is, processing of next request starts only when  
> > previous requests was handled and response sent (at least to socket  
> > buffer).
> 
> Thank you for fast response.  
> Is it common approach how NGINX serves pipelined requests to any  
> upstream module or FCGI specific?

It’s how nginx handles pipelined requests (regardless of any  
processing details).

> Is there any technique to speed it up?

Use multiple connections?

Maxim D.
