httpd 2.2.3 reverse proxy persistent connection question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

we are using httpd 2.2.3 reverse proxy to load balance the traffic between backend servers. It is working fine.
However I have a question for HTTP 1.1 persistant connection when backend servers reply with HTTP error.
In this case httpd reverse proxy is sending Connection:close to the client.
In case that backend server replies with HTTP 200 OK, connection parameter is keep-alive.

Based on RFC2616 - http://tools.ietf.org/html/rfc2616#section-8.1.1  HTTP errors should not break persistent connection.

      - HTTP can evolve more gracefully, since errors can be reported
        without the penalty of closing the TCP connection. Clients using
        future versions of HTTP might optimistically try a new feature,
        but if communicating with an older server, retry with old
        semantics after an error is reported.


Can you please advise if this is how httpd reverse proxy is supposed to work or I am missing some configuration?

Nikolay


#############################
#Flow with HTTP 500 error
#client to Proxy
POST /services/ProvProxy HTTP/1.1
Referer: http://10.10.10.10:18089/services/ProvProxy
Content-Type: text/xml
SOAPAction:
User-Agent: Wireless Intelligent Network/1.0 (nc stream)
Host: 10.10.10.10
Content-Length: 999
Connection: Keep-Alive
Cache-Control: no-cache

#Proxy to backend
POST /services/ProvProxy HTTP/1.1
Host: 10.10.10.11:8280
Referer: http://10.10.10.10:18089/services/ProvProxy
Content-Type: text/xml
SOAPAction:
User-Agent: Wireless Intelligent Network/1.0 (nc stream)
Cache-Control: no-cache
X-Forwarded-For: 10.10.10.10
X-Forwarded-Host: 10.10.10.10
X-Forwarded-Server: 10.10.10.10
Connection: Keep-Alive
Content-Length: 427

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)/JBossWeb-2.0
Date: Wed, 01 Aug 2012 17:25:27 GMT
Transfer-Encoding: chunked
Connection: Keep-Alive
##

# Proxy response with Connection: close.
HTTP/1.1 500 Internal Server Error
Date: Wed, 01 Aug 2012 17:25:26 GMT
Server: Apache-Coyote/1.1
Content-Type: text/xml; charset=UTF-8
X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)/JBossWeb-2.0
Connection: close
Transfer-Encoding: chunked


httpd config:

NameVirtualHost 10.10.10.10:18089

<VirtualHost 10.10.10.10:18089>
    ServerName 10.10.10.10:18089
    <Proxy balancer://wwwcluster4>
        BalancerMember http://10.10.10.10:8280 route=www7
        BalancerMember http://10.10.10.11:8280 route=www8
    </Proxy>
    ProxyPass /services/ balancer://wwwcluster4/services/
    ProxyPassReverse /services/ balancer://wwwcluster4/services/
   
<Location /server-status>
   SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1 10.10.10.0/24
</Location>
</VirtualHost>

<Location /balancer-manager>
SetHandler balancer-manager
Order deny,allow
Deny from all
Allow from 127.0.0.1 10.10.10.0/24
</Location>


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux