# Question about upstream keepalive + fastcgi + gzip

**URL:** <https://www.ruby-forum.com/t/question-about-upstream-keepalive-fastcgi-gzip/213331>\
**Category:** NGINX\
**Created:** [October 30, 2011, 4:40pm UTC](https://www.ruby-forum.com/t/question-about-upstream-keepalive-fastcgi-gzip/213331 "2011-10-30T16:40:27Z")\
**Posts on this page:** 3\
**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:** [October 30, 2011, 4:40pm UTC](https://www.ruby-forum.com/t/question-about-upstream-keepalive-fastcgi-gzip/213331/1 "2011-10-30T16:40:27Z")

</div>

Hi,

With the keepalive upstream / fastcgi patch nginx is now capable of  
sending  
out chunked transfers for content received on fastcgi interface.

Is there anyway to get something like apache’s flushpackets  
functionality?

Flushpackets – Determines whether the proxy module will auto-flush the  
output brigade after each “chunk” of data.

This would mean setting up an option to send ngx\_http\_send\_special(r,  
NGX\_HTTP\_FLUSH) after every chunk received on fastcgi in order to make  
it  
pass gzip module as well? Pointers which module to patch  
(ngx\_http\_upstream,  
ngx\_http\_upstream\_keepalive\_module, ngx\_http\_fastcgi\_module) and where  
are  
very welcome.

Best regards,

Primoz

---

<div class="post-metadata">

**Author:** ![Primoz\_Bratanic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@Primoz\_Bratanic](https://www.ruby-forum.com/u/Primoz_Bratanic)\
**Post date:** [October 30, 2011, 7:27pm UTC](https://www.ruby-forum.com/t/question-about-upstream-keepalive-fastcgi-gzip/213331/2 "2011-10-30T19:27:30Z")

</div>

Have you tried simply disabling the buffers?  
[http://wiki.nginx.org/HttpFcgiModule#fastcgi\_buffers](http://wiki.nginx.org/HttpFcgiModule#fastcgi_buffers)

Posted at Nginx Forum:

> **[Re: Question about upstream keepalive + fastcgi + gzip](https://forum.nginx.org/read.php?2,217544,217548#msg-217548)**
>
> Hi, With the keepalive upstream / fastcgi patch nginx is now capable of sending out chunked transfers for content received on fastcgi interface. Is there anyway to get something like apache's flushpackets functionality?

---

<div class="post-metadata">

**Author:** ![Primoz\_Bratanic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@Primoz\_Bratanic](https://www.ruby-forum.com/u/Primoz_Bratanic)\
**Post date:** [October 30, 2011, 7:39pm UTC](https://www.ruby-forum.com/t/question-about-upstream-keepalive-fastcgi-gzip/213331/3 "2011-10-30T19:39:50Z")

</div>

Hi,

This brings with itself too much of a performance penalty. I would just  
like  
to have the behaviour I get in the latest versions without using gzip  
replicated when using gzip. As everything works like a charm when making  
a  
test case using echo\_flush, gzip is obviously ready, so just need a  
pointer  
where to go (upstream, upstream-keepalive of fastcgi).

Best regards,

Primoz
