Re: timeout and keepalive parameter in ProxyPass

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

 



The global "Timeout" parameter is needed to set the length of time Apache httpd will wait for I/O in various circumstances.
https://httpd.apache.org/docs/2.4/mod/core.html#timeout


The "keepalive" attribute of ProxyPass can be used to fool your network equipments (like intermediate firewalls) to mantain the tcp connection between apache and its backends open even when no data is passing from and to the wires. Some network equipment like firewalls tend to drop inactive (silent) connections too early (from my experience ~30 min but your mileage may vary).

The "timeout" attribute of ProxyPass is the number of seconds Apache httpd waits for data sent by / to the backend. So in your case apache will close a inactive connection with the backend in 1hr, but while your backend continue to stream data the connection will be kept open. Yes, it's a sort of application timeout.

There is also the "connectiontimeout" attribute of ProxyPass that will consider a new TCP connection with the backend not valid if it takes the specified time to complete (TCP SYN + SYN/ACK + ACK) so it can be retried earlier.




13 ottobre 2021 16:22, "Usha Nayak" <ushanay@xxxxxxxxx> wrote:
Hello
Need help in understanding the highlighted parameters:
ProxyPass "/example" "http://backend.example.com" timeout=3600 keepalive=On
keepalive parameter - As I understand relates to TCP or socket keep alive probes that are sent to prevent idle connection.
image.png
My confusion is :
Assuming the backend server takes 4 hrs to process a request and I have 'keepalive on' in Apache httpd with the OS setting to send tcp probes every 2 minutes. Backend server and Apache httpd are sending TCP keep alive packets to indicate the socket connection is not idle.
  • In this case, would the 'apache httpd' close the connection in 1 hr ( timeout = 3600) because the 'apache httpd' didn't get the http data? Is this timeout 'apache httpd' application timeout ?
Appreciate help.
Thanks.



[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