[squid-dev] [PATCH] url_rewrite_timeout directive

Alex Rousskov rousskov at measurement-factory.com
Tue Nov 18 23:24:51 UTC 2014


On 11/17/2014 10:10 AM, Tsantilas Christos wrote:
> On 11/16/2014 01:05 PM, Amos Jeffries wrote:
>>   It seems to me this should be doing one of the below:
>>
>>   on_timeout=use_configured_response response=ERR
>>   on_timeout=use_configured_response response=BH
>>
>> although being able to redirect to a Squid default error page template
>> has its attractions regardless of this. Perhapse BH with an
>> error=ERR_GATEWAY_FAILURE kv-pair ?

> The on_timeout= option is easier to understand and configure.

...

>> So as you can see, with a change to make the URL-rewriter capable of
>> redirecting to one of the built-in error page templates we could
>> completely drop the on_timeout setting.
> 
> I still believe that the "on-timeout" is better options and easier to
> understand and configure.


Overall, I agree with Christos here. While the underlying functionality
is similar, the usability of human-friendly keywords is better for
admins, especially for those admins that are not intimately familiar
with our [rather ugly] helper protocol and/or do not want to track
future protocol changes.

The "use configured response" functionality is a fine-tuning knob for
those few admins that need precise control. The simple actions are for
90% of the admins who do not really need that.


I agree with Amos that the response=... option does not have to have an
explicit on-timeout action (because the option determines the action).
If we make this change, the admin will have to pick one of the two
url_rewrite_timeout formats, along these lines:

  url_rewrite_timeout timeout time-units on_timeout=<fail|bypass|retry>
  url_rewrite_timeout timeout time-units timeout_response=...

Personally, I think the originally proposed syntax (with the required
on_timeout action) is easier to understand because it is more
explicit/straightforward, but it is not a big deal IMO. Amos, if the
on_timeout action stays, would you still prefer the dual format sketched
above?


>> By all means call (and clear) the callback on a timeout but please do
>> not remove the queue entries for them until the helper actually
>> responds to that query.

> Some of the queries will never  answered. This is may result to memory leaks. 

Exactly! We must remove timed out transactions from Squid memory. There
is no good reason to keep them around because nobody is waiting for them
anymore.


Thank you,

Alex.



More information about the squid-dev mailing list