Welcome! Log In Create A New Profile

Advanced

Keepalive not working with upstream tcp server

Jayadev C
April 02, 2014 04:02AM
I am trying to use nginx to proxy my requests to a custom tcp backend server that I have. I am following the same model as the default memcached module with in the nginx code base (1.5.10) , the relevant config file attached.  Tried with most of the keepalive options but I still see new connections getting created to upstream server. (rather I do see the connection getting closed by nginx in strace)


Do I need to specifically compile nginx with http upstream keepalive module, thought it was default enabled but the code doesn't seem to go through it looking in gdb.  Is there any other specific module  or setting I need to use for the upstream tcp persistent connection usecase.

Thanks in advance,
Jayadev


--- nginx.conf------

http {
    default_type  application/octet-stream;
    keepalive_timeout  100;
    proxy_http_version 1.1;

    upstream my_backend {
            server 127.0.0.1:1111;
            keepalive 100;
    }

    server {
         listen       4080;
         keepalive_timeout  100;
         keepalive_requests 100000;
         proxy_http_version 1.1;
         proxy_set_header Connection keepalive;

         location / {
                 root   html;
                 index  index.html index.htm;
                 my_pass my_backend;
         }
    }_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Keepalive not working with upstream tcp server

Jayadev C April 02, 2014 04:02AM

Re: Keepalive not working with upstream tcp server

Maxim Dounin April 02, 2014 10:54AM

Re: Keepalive not working with upstream tcp server

Jayadev C April 02, 2014 12:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
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