[ 
https://issues.apache.org/jira/browse/TS-4403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265444#comment-15265444
 ] 

ASF GitHub Bot commented on TS-4403:
------------------------------------

GitHub user jacksontj opened a pull request:

    https://github.com/apache/trafficserver/pull/609

    TS-4403: Fix stale-while-revalidate on DNS lookup failures

    HostDB's "stale-while-revalidate" feature allows hostdb to return stale 
records while doing the DNS lookup in the background. This works properly in 
the case where the resolver goes away, but in the case that an error was 
returned from the resolver the record in cache was thrown away. This means that 
a transient error out in the DNS infrastructure would cause ATS to drop its 
stale record it would have contently served-- this patch simply makes hostdb 
honor its stale-while-revalidate contract (if configured). So, in the event 
that the DNS result comes back as `failed` hostdb will keep the old one if it 
is okay with being served stale.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jacksontj/trafficserver TS-4403

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/609.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #609
    
----
commit 92bba349b5e4846761245e4629921632355c3c83
Author: Thomas Jackson <[email protected]>
Date:   2016-04-30T19:16:40Z

    TS-4403: Fix stale-while-revalidate on DNS lookup failures
    
    HostDB's "stale-while-revalidate" feature allows hostdb to return stale 
records while doing the DNS lookup in the background. This works properly in 
the case where the resolver goes away, but in the case that an error was 
returned from the resolver the record in cache was thrown away. This means that 
a transient error out in the DNS infrastructure would cause ATS to drop its 
stale record it would have contently served-- this patch simply makes hostdb 
honor its stale-while-revalidate contract (if configured). So, in the event 
that the DNS result comes back as `failed` hostdb will keep the old one if it 
is okay with being served stale.

----


> HostDB's "stale while revalidate" doesn't span failed DNS lookups
> -----------------------------------------------------------------
>
>                 Key: TS-4403
>                 URL: https://issues.apache.org/jira/browse/TS-4403
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Thomas Jackson
>
> Right now if you set stale_while_revalidate hostdb will return the stale 
> record while waiting on the DNS lookup. In the event that you have the DNS 
> timeout set low (lets say 1 second) and the DNS server times out (lets say 
> due to an outage of your resolver) then ATS will start replacing all of your 
> stale entries (which were working) with error timeout entries (which are 
> empty)-- which is bad.
> The stale while revalidate configuration should serve stale records until a 
> valid response from DNS comes back-- the patch here should be relatively 
> simple, just a bit of a nuisance to test since DNS requires port 53 ;)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to