Hi

I use a different approach to these types of requests.

The back end request immediately returns a status message ”Request Received”

On Subsequent Requests returns a status message ”Working”

Finally, Subsequent Request returns a status message ”Ready” with results.

John Orendt
john.p.ore...@medtronic.com

From: Usha Nayak <usha...@gmail.com>
Sent: Tuesday, October 19, 2021 10:37 AM
To: users@httpd.apache.org
Subject: [EXTERNAL] Re: [users@httpd] timeout and keepalive parameter in 
ProxyPass

Hello

Thank you for your response. However, I'm still a bit fuzzy when it comes to 
the keepalive and timeout attribute.

I understand keepalive=On attribute by itself but in combination with timeout 
is where I'm unclear.

In the scenario that I presented with following:

  *    timeout=3600 keepalive=On attributes
  *    backend server taking a long time processing the request sent by client 
( note: no streaming any data from server yet since it's busy processing the 
request, let's say processing time on server is 4 hrs )
  *    OS settings are set to send TCP Keep alive packet in every 2 mins

My guess:

  *   With TCP keep alive probes sent and ACK between 'Apache httpd' machine 
and 'Backend server' machine, we can be assured that there's no inactive or 
idle TCP connection.
  *   But, from the 'Apache Httpd' application point of view, it hasn't 
received the data from the server in 1 hr(3600), and therefore 'Apache Httpd' 
will initiate a timeout. When the 'Backend Server' is ready in 4 hrs to stream 
the response back, there's no ' Apache Httpd' client to receive the response.
Please do correct me if I'm thinking this incorrectly,

Appreciate all the help

Thanks.


On Wed, Oct 13, 2021 at 10:03 AM Dino Ciuffetti 
<d...@tuxweb.it<mailto:d...@tuxweb.it>> wrote:
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<https://urldefense.com/v3/__https:/httpd.apache.org/docs/2.4/mod/core.html*timeout__;Iw!!NFcUtLLUcw!DmkJVqMAt4NaSGwLZq93nIthjgNb1gK5MwyqdCke2kFmEvHGUM062jIb-qTQ7np89F8i_g$>


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" 
<usha...@gmail.com<mailto:usha...@gmail.com?to=%22usha%20nayak%22%20%3cusha...@gmail.com%3E>>
 wrote:
Hello
Need help in understanding the highlighted parameters:
ProxyPass "/example" 
"http://backend.example.com<https://urldefense.com/v3/__http:/backend.example.com__;!!NFcUtLLUcw!DmkJVqMAt4NaSGwLZq93nIthjgNb1gK5MwyqdCke2kFmEvHGUM062jIb-qTQ7npt-Xfx7Q$>"
 timeout=3600 keepalive=On
keepalive parameter - As I understand relates to TCP or socket keep alive 
probes that are sent to prevent idle connection.
[cid:image001.png@01D7C4D6.CF3A0310]
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.

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is 
proprietary to Medtronic and is intended for use only by the individual or 
entity to which it is addressed, and may contain information that is private, 
privileged, confidential or exempt from disclosure under applicable law. If you 
are not the intended recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination 
of this information in any manner is strictly prohibited. In such cases, please 
delete this mail from your records. To view this notice in other languages you 
can either select the following link or manually copy and paste the link into 
the address bar of a web browser: http://emaildisclaimer.medtronic.com

Reply via email to