Hi,

I'm using httpd as a reverse proxy. The backend server fragments responses in 2 
parts.

When clients connecting with keep-alive, the first response from the backend 
server is received normally, but all subsequent responses have a delay.
This delay happens because Apache is waiting around 40ms to acknowledge the 
first fragment from the backend server. It appears to be a bad combination of 
TCP delayed ACK on Apache's side and Nagle algorithm on the backend side. 

Is there any way to make sure that Apache uses TCP_NODELAY or TCP_QUICKACK 
options in its sockets?


Here is the relevant trace of the 2nd request:

3.384012 client -> apache HTTP 166 GET /whatever HTTP/1.1 
  3.384136    apache -> backend    HTTP 275 GET /whatever HTTP/1.1 
  3.387660    backend -> apache    TCP 919 [TCP segment of a reassembled PDU]
  3.387780   apache -> client TCP 950 [TCP segment of a reassembled PDU]
  3.427353    apache -> backend   TCP 68 38757 > 8081 [ACK] Seq=10144 Ack=41940 
Win=116224 Len=0 TSval=1245880144 TSecr=1245880104
  3.427365    backend -> apache    HTTP 73 HTTP/1.1 302 Found  (text/html)
 3.427433    apache -> backend    TCP 68 38757 > 8081 [ACK] Seq=10144 Ack=41945 
Win=116224 Len=0 TSval=1245880144 TSecr=1245880144
  3.427457 apache -> client HTTP 73 HTTP/1.1 302 Found  (text/html)



And this is the configuration of the reverse proxy:
<VirtualHost *:80>
        ErrorLog logs/reverse-error.log
        ProxyPass / http://localhost:8081/ flushwait=0 flushpackets=on
</VirtualHost>


best,
Duarte Meneses
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to