|
|
Chromium Code Reviews
DescriptionRace preconnects to HTTP2 proxies that support alternate proxies
If the proxy supports an alternative proxy server, then an alternative
job is started after proxy resolution. The job controller is destroyed
after both the jobs finish.
The new behavior is guarded behind a field trial param.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester
BUG=671291
Patch Set 1 : ps #
Total comments: 11
Patch Set 2 : Rebased, rch comments #
Total comments: 7
Messages
Total messages: 72 (67 generated)
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:1) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
Description was changed from ========== DOOO NOOOT SUUUUBMIT BUG= ========== to ========== DOOO NOOOT SUUUUBMIT CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG= ==========
Patchset #3 (id:60001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Description was changed from ========== DOOO NOOOT SUUUUBMIT CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG= ========== to ========== alt proxy DOOO NOOOT SUUUUBMIT CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG= ==========
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:20001) has been deleted
Patchset #1 (id:40001) has been deleted
Patchset #2 (id:100001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...)
Patchset #3 (id:140001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:120001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:80001) has been deleted
Description was changed from ========== alt proxy DOOO NOOOT SUUUUBMIT CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG= ========== to ========== Race preconnects to HTTP2 proxies that support alternate proxies CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG= ==========
Description was changed from ========== Race preconnects to HTTP2 proxies that support alternate proxies CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG= ========== to ========== Race preconnects to HTTP2 proxies that support alternate proxies CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG=671291 ==========
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #3 (id:200001) has been deleted
Patchset #2 (id:180001) has been deleted
Patchset #1 (id:160001) has been deleted
Description was changed from ========== Race preconnects to HTTP2 proxies that support alternate proxies CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG=671291 ========== to ========== Race preconnects to HTTP2 proxies that support alternate proxies If the proxy supports an alternative proxy server, then an alternative job is started after proxy resolution. The job controller is destroyed after both the jobs finish. The new behavior is guarded behind a field trial param. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG=671291 ==========
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #3 (id:260001) has been deleted
Patchset #1 (id:220001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
tbansal@chromium.org changed reviewers: + rch@chromium.org
rch: ptal at PS# 2. Thanks.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
rch: ping. thanks.
Sorry for the delay :( https://codereview.chromium.org/2595413002/diff/280001/net/http/http_network_... File net/http/http_network_session.h (right): https://codereview.chromium.org/2595413002/diff/280001/net/http/http_network_... net/http/http_network_session.h:212: bool race_preconnects_to_proxies; The comment says this is only for HTTP2 proxies, but the member name does not mention http2. I suspect (and hope) that this also applies to QUIC proxies... https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:401: DCHECK(alternative_proxy_server.is_quic()); Why is this guaranteed to be true? https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:405: job->RestrictNumStreamsToOne(); It seems like this is a bit orthogonal to racing alt-proxies, isn't it? https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:505: 1, 2); I don't understand what this histogram is recording?
Patchset #1 (id:240001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
rch: ptal. thanks. https://codereview.chromium.org/2595413002/diff/280001/net/http/http_network_... File net/http/http_network_session.h (right): https://codereview.chromium.org/2595413002/diff/280001/net/http/http_network_... net/http/http_network_session.h:212: bool race_preconnects_to_proxies; On 2017/01/23 18:05:53, Ryan Hamilton wrote: > The comment says this is only for HTTP2 proxies, but the member name does not > mention http2. Done. > I suspect (and hope) that this also applies to QUIC proxies... Did you mean a QUIC proxy explicitly specified as quic://myproxy... Then, answer is no. https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:401: DCHECK(alternative_proxy_server.is_quic()); On 2017/01/23 18:05:53, Ryan Hamilton wrote: > Why is this guaranteed to be true? Removed. (Currently it is true because QUIC is the only alternative service). https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:405: job->RestrictNumStreamsToOne(); On 2017/01/23 18:05:53, Ryan Hamilton wrote: > It seems like this is a bit orthogonal to racing alt-proxies, isn't it? The preconnections for non-proxy http2 jobs restrict the number of preconnect streams to 1. https://cs.chromium.org/chromium/src/net/http/http_stream_factory_impl_job.cc... This CL enables preconnects for proxy http2 jobs. So, we should also restrict the preconnect streams to 1 for proxy http2/quic jobs. I can do it in a separate CL too, but then I would need to plumb |num_streams| from the Job to HttpStreamFactoryImpl::JobController::StartAlternativeProxyServerJob() method below. https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:505: 1, 2); On 2017/01/23 18:05:53, Ryan Hamilton wrote: > I don't understand what this histogram is recording? It is just recording how many times preconnect jobs were raced. I have changed the variable name.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
https://codereview.chromium.org/2595413002/diff/280001/net/http/http_network_... File net/http/http_network_session.h (right): https://codereview.chromium.org/2595413002/diff/280001/net/http/http_network_... net/http/http_network_session.h:212: bool race_preconnects_to_proxies; On 2017/01/23 21:48:22, tbansal1 wrote: > On 2017/01/23 18:05:53, Ryan Hamilton wrote: > > The comment says this is only for HTTP2 proxies, but the member name does not > > mention http2. > Done. > > I suspect (and hope) that this also applies to QUIC proxies... > Did you mean a QUIC proxy explicitly specified as quic://myproxy... > Then, answer is no. Hm. Seems like it should work for QUIC proxies too, shouldn't it? https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:401: DCHECK(alternative_proxy_server.is_quic()); On 2017/01/23 21:48:22, tbansal1 wrote: > On 2017/01/23 18:05:53, Ryan Hamilton wrote: > > Why is this guaranteed to be true? > > Removed. (Currently it is true because QUIC is the only alternative service). We also support HTTP/2 based Alt-Svc. https://codereview.chromium.org/2595413002/diff/280001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:405: job->RestrictNumStreamsToOne(); On 2017/01/23 21:48:22, tbansal1 wrote: > On 2017/01/23 18:05:53, Ryan Hamilton wrote: > > It seems like this is a bit orthogonal to racing alt-proxies, isn't it? > > The preconnections for non-proxy http2 jobs restrict the number of preconnect > streams to 1. > https://cs.chromium.org/chromium/src/net/http/http_stream_factory_impl_job.cc... > > This CL enables preconnects for proxy http2 jobs. So, we should also restrict > the preconnect streams to 1 for proxy http2/quic jobs. Ah, I see. You're saying that "restrict to 1 stream" is inherently part of preconnect, and since this CL implements a new preconnect mechanism, we need to do the same thing. Did I get that right? > I can do it in a separate CL too, but then I would need to plumb |num_streams| > from the Job to > HttpStreamFactoryImpl::JobController::StartAlternativeProxyServerJob() method > below. https://codereview.chromium.org/2595413002/diff/300001/net/http/http_network_... File net/http/http_network_session.h (right): https://codereview.chromium.org/2595413002/diff/300001/net/http/http_network_... net/http/http_network_session.h:308: void DisableQuic(); nit: it's best to upload Rebase patch sets independently from functional changes so that it's easier for reviewers to compare two patch sets and see just what changed. Not a big deal of course, but it's handy. https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... File net/http/http_stream_factory_impl_job_controller.cc (left): https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:1043: return false; you could probably add a DCHECK here checking the param which enable preconnects to alt proxies. https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:402: DCHECK_EQ(main_job_.get(), job); The previous line suggest that this job might not be the main job if is_preconnect_ is true. If that's the case, isn't this DCHECK invalid? Or alternatively, should is_preconnect_ be removed from the first DCHECK? (Or more likely than either, am I confused?) https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:409: } So this restricts the number of streams on the main job, right? But if we're doing a preconnect for the main job, wouldn't we have started it by calling Preconnect() which sets num_streams to 1? https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:426: main_job_is_blocked_ = true; I believe this all means that the main job will now pause and give the alt-job a head start. (Which is desirable). Can you make sure we have a test of this case? (Where we don't send any traffic to the HTTP/2 proxy if the QUIC proxy can do 0-RTT.) https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:508: "Net.QuicAlternativeProxy.PreconnectRace.FirstJobFinished", 1, 2); I'm not sure "FirstJobFinished" adds any value to the name of the histograms. I'd probably remove it. Also, you might consider making the histogram's value be true if the main job finished first, and false otherwise (or use an enum). This will help us understand what's going on better. https://codereview.chromium.org/2595413002/diff/300001/net/http/http_stream_f... net/http/http_stream_factory_impl_job_controller.cc:1154: } nit: I'd structure this slightly differently: if (is_preconnect) { ... Preconnect(); return; } if (!request_) return; ... This avoid a bit of nesting which is always nice.
rch@chromium.org changed reviewers: - rch@chromium.org |
