HTTP Keepalive @Maxim Dounin

Today I read through the code of the
http://mdounin.ru/hg/ngx_http_upstream_keepalive/

Although my understanding of nginx internals is limited, I did C
programming
back in my youth. From my understanding of the code there is very little
modification needed in order to add HTTP (backend HTTP/1.1) keep alive.

As I see it to complete this the protocol has to be updated to the
version
of 1.1 and the “Connection: keep-alive” header needs to be added to
responses, this would add very basic keep alive support to nginx I would
beleive (please do correct me if I am wrong)

To make the modifications howeaver it would be necessary to edit the
nginx
source (or make a new http backend plugin, which could be mostly copy
and
paste) – I would be more specific on this matter but nginx.org is down
currently and im not able to get the latest version of the source to
look
at.

Would it be possible for someone with a knowledge of nginx internals to
take
a look at this and tell me if I am going about this the correct way? I
am
going to fiddle a bit and see if I can produce a plugin once nginx.org
comes
back up.

Hi, Maxim!

On Tue, Jul 12, 2011 at 5:50 AM, Maxim D. [email protected]
wrote:

The fun starts somewhere near “the protocol has to be updated to
the version of 1.1”. My current diff is something like “7 files
changed, 688 insertions(+), 29 deletions(-)” and still growing.

So…if I read it correctly, you’re already actively working on the
HTTP 1.1 protocol support for ngx_http_proxy_module? I’m asking
because I’ve been planning to do this in August. If you’re already on
it, then there’s no need to duplicate the efforts on my side and I can
work on something else :wink:

Thanks!
-agentzh

Your working on 1.1 support? Yay for me not needing to work on it. I was
going to give it an attempt but judging by the number of inserts I
probably
would have failed.

Hi Maxim,

Are you developing the HTTP/1.1 proxy module? Great news.

I’m just collecting your old patch and developing a new patch for
backend
keepalive(https://github.com/yaoweibin/nginx_upstream_keepalive_patch ).
I
don’t know if there is any serious problem. My Test Set is too small. If
you
find any problem, shoot me.

Thanks.

2011/7/12 Maxim D. [email protected]

Hello!

On Tue, Jul 12, 2011 at 07:06:23AM +1000, SplitIce wrote:

beleive (please do correct me if I am wrong)
:slight_smile:

The fun starts somewhere near “the protocol has to be updated to
the version of 1.1”. My current diff is something like “7 files
changed, 688 insertions(+), 29 deletions(-)” and still growing.

To make the modifications howeaver it would be necessary to edit the nginx
source (or make a new http backend plugin, which could be mostly copy and
paste) – I would be more specific on this matter but nginx.org is down
currently and im not able to get the latest version of the source to look
at.

Would it be possible for someone with a knowledge of nginx internals to take
a look at this and tell me if I am going about this the correct way? I am
going to fiddle a bit and see if I can produce a plugin once nginx.org comes
back up.

nginx.org looks perfectly up from here (and isup.me says the
same), probably it’s just you.

Maxim D.

Looking foward to seeing it. When its ready for testing feel free to
post it
in the nginx group and Ill happily help out :slight_smile:

2011/7/12 Maxim D. [email protected]

Hello!

On Tue, Jul 12, 2011 at 09:59:38AM +0800, agentzh wrote:

HTTP 1.1 protocol support for ngx_http_proxy_module? I’m asking
Yes.

Maxim D.