New issue
Advanced search Search tips

Issue 605138 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

DNS: Do interesting things with stale cache entries

Project Member Reported by juliatut...@chromium.org, Apr 20 2016

Issue description

Right now, we never do anything interesting with stale cache entries. There are some cool things we could do:

1. Let Cronet embedders specify that they're okay with using stale entries after a delay, to reduce long-tail latency.

2. When asked for a TCP connection to a hostname with a stale DNS entry in cache, speculatively connect to the stale address(es) while we re-request the DNS entry. If the address we connected to is still listed in the entry, keep it and enjoy lower connection latency. If not, retry with the addresses in the new entry.

Maybe other things, too.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/317860ed4f3e3788fd3c4637ee5d91afd31e39b1

commit 317860ed4f3e3788fd3c4637ee5d91afd31e39b1
Author: juliatuttle <juliatuttle@chromium.org>
Date: Thu May 12 14:47:22 2016

DNS: Retain stale entries in HostCache and return when requested

In preparation for future connection optimizations, retain stale
entries (those with a response past the TTL or received on a different
network) in the cache, and expose a way to look up and characterize the
stale results.

To do this, HostCache moves away from using ExpiringCache to a self-
managed map of keys to entries, with extra metadata.

Also, add a bunch of histograms measuring how stale updated entries are.

BUG=605138

Review-Url: https://codereview.chromium.org/1908543002
Cr-Commit-Position: refs/heads/master@{#393246}

[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/dns_util.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/dns_util.h
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/host_cache.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/host_cache.h
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/host_cache_unittest.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/host_resolver_impl.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/host_resolver_mojo.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/dns/mock_host_resolver.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/net/log/net_log_util.cc
[modify] https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1/tools/metrics/histograms/histograms.xml

Project Member

Comment 2 by bugdroid1@chromium.org, May 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/abd7fc83302b46dba0835405767e9bc6e9a332e0

commit abd7fc83302b46dba0835405767e9bc6e9a332e0
Author: juliatuttle <juliatuttle@chromium.org>
Date: Mon May 23 21:07:45 2016

Fix spelling of a few histograms.

I added a bunch of histograms in https://crrev.com/1908543002/, but
misspelled (or forgot to rename) a few, and the presubmit didn't catch
them because they were logged through a macro.

BUG=605138

Review-Url: https://codereview.chromium.org/1991823004
Cr-Commit-Position: refs/heads/master@{#395410}

[modify] https://crrev.com/abd7fc83302b46dba0835405767e9bc6e9a332e0/net/dns/host_cache.cc

Related internal bug b/30731305
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50d9c4b48edf4cb160b426fea7475e689cd1816b

commit 50d9c4b48edf4cb160b426fea7475e689cd1816b
Author: juliatuttle <juliatuttle@chromium.org>
Date: Tue Aug 23 22:49:19 2016

Cronet: Use stale DNS cache entries experimentally.

Create a Cronet-specific HostResolver that uses stale DNS cache entries
when available after a delay, to reduce DNS latency at the expense of
accuracy.

Configure it in place of (actually wrapped around) the default resolver
when configured by Cronet experimental options.

Design doc:
https://docs.google.com/document/d/1qmxDNfNUIK2cQQi9u_-Qv3PKxEbEtBKhEvIOza2s7wU/view

BUG=605138

Review-Url: https://codereview.chromium.org/1898873006
Cr-Commit-Position: refs/heads/master@{#413875}

[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet.gypi
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/android/BUILD.gn
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/cronet_static.gypi
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/ios/BUILD.gn
[add] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/stale_host_resolver.cc
[add] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/stale_host_resolver.h
[add] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/stale_host_resolver_unittest.cc
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/url_request_context_config.cc
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/components/cronet/url_request_context_config_unittest.cc
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/net/dns/host_resolver.cc
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/net/dns/host_resolver.h
[modify] https://crrev.com/50d9c4b48edf4cb160b426fea7475e689cd1816b/tools/metrics/histograms/histograms.xml

Owner: ----
Owner: mge...@chromium.org

Comment 8 by mge...@chromium.org, Mar 23 2018

Owner: ----
Status: Available (was: Started)

Sign in to add a comment