New issue
Advanced search Search tips

Issue 838763 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 12
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug
Proj-Servicification

Blocking:
issue 809583
issue 837333



Sign in to add a comment

Figure out what to do for net::ProxyResolutionService::TryResolveProxySynchronously() used by Predictor

Project Member Reported by xunji...@chromium.org, May 2 2018

Issue description

Predictor currently depends on the ability to check if proxy can be resolved synchronously (see net::ProxyResolutionService::TryResolveProxySynchronously)

https://cs.chromium.org/chromium/src/chrome/browser/net/predictor.cc?rcl=5204eb18ab845ca715a8c256adea21463166c7f5&l=978

https://cs.chromium.org/chromium/src/chrome/browser/predictors/preconnect_manager.cc?rcl=5204eb18ab845ca715a8c256adea21463166c7f5&l=264

With network service, all calls to ProxyResolution service will be async. Network service won't be able to support this sync feature.

We need to figure out a way forward.

 
alexilin@: How important is net::ProxyResolutionService::TryResolveProxySynchronously() for the predictor? 
The predictor uses this call to avoid preresolving dns addresses if a proxy is enabled.

I didn't want to use this sync call in the new predictor initially but it caused a regression on perf bots. The reason is that we don't preconnect until an address is successfully resolved. Some of perf bots are offline and use proxy for testing so dns requests always fail and we can't preconnect.

We could make an async request to resolve proxy in parallel with dns resolve and go straight to the preconnect if a proxy is enabled.

Comment 3 by dxie@chromium.org, May 15 2018

Labels: -Pri-3 Proj-Servicification-Canary OS-All Pri-1
Status: Available (was: Untriaged)

Comment 4 by dxie@chromium.org, May 18 2018

Labels: -OS-All OS-Windows OS-Linux OS-Mac OS-Chrome OS-Android

Comment 5 by dxie@chromium.org, Jun 7 2018

Labels: -Pri-1 Pri-2
Cc: -alexilin@chromium.org
Owner: alexilin@chromium.org
Status: Assigned (was: Available)
alex, let me know if you can start on this since it should be unblocked now.
Blocking: 809583
Status: Started (was: Assigned)
I'm proceeding with the plan proposed in c#2 for the new predictor, i.e. issuing an async request to resolve proxy in parallel with dns request. 

NetworkContext::LookUpProxyForURL() is the API for proxy resolution I'm going to use.
can you provide an update?
Labels: -Proj-Servicification-Canary
I decided to not block the network servicification on this. I'll remove the synchronous call to the ProxyResolutionProxy in my next CL and I'll add support of async resolution after that.
Labels: Hotlist-KnownIssue
Labels: -Hotlist-KnownIssue
Labels: Proj-Servicification-Stable Hotlist-KnownIssue
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 10

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

commit 248c267fc1c931ba1863d72bb1ddbd45f8680218
Author: Alexandr Ilin <alexilin@chromium.org>
Date: Mon Sep 10 10:40:51 2018

predictors: Request a proxy lookup in parallel with host resolve request

This CL adds an asynchronous proxy lookup request to the PreconnectManager
after the synchronous request was removed in https://crrev.com/c/1165550.
The idea is that we don't need to wait for a host to be resolved before a
preconnect if a proxy is enabled.

Since we don't have a synchronous API for proxy lookup anymore, we issue both
host and proxy requests in parallel. Then we wait until either one of the
requests completes with success or both requests fail.

Bug:  838763 
Change-Id: Ib3fa47884ba82d1fc12c62f7fd24dd21c279e9c5
Reviewed-on: https://chromium-review.googlesource.com/1202222
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589877}
[modify] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/BUILD.gn
[modify] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/loading_predictor_browsertest.cc
[modify] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/loading_stats_collector_unittest.cc
[modify] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/preconnect_manager.cc
[modify] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/preconnect_manager.h
[modify] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/preconnect_manager_unittest.cc
[add] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/proxy_lookup_client_impl.cc
[add] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/browser/predictors/proxy_lookup_client_impl.h
[add] https://crrev.com/248c267fc1c931ba1863d72bb1ddbd45f8680218/chrome/test/data/predictors/proxy.pac

Status: Fixed (was: Started)
A synchronous proxy lookup was replaced by an asynchronous one, see c#13. Marking this as Fixed.

Sign in to add a comment