Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Issue 2522703002: Allow at most one preconnect to HTTP2 proxy servers (Closed)

Created:
4 years, 1 month ago by tbansal1
Modified:
4 years ago
Reviewers:
rkaplow, Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, tbansal+watch-data-reduction-proxy_chromium.org, Zhongyi Shi
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow at most one preconnect to HTTP2 proxy servers If Chromium is using a HTTP2 proxy server, then the preconnect jobs are skipped if a preconnect request is already pending. This prevents Chromium from unnecessarily establishing multiple preconnections to an HTTP2 proxy. The new behavior is guarded behind a field trial so that the performance benefits can be evaluated. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG=667471 Committed: https://crrev.com/0844a896c0334b3541315e79d1048789ea14cc71 Cr-Commit-Position: refs/heads/master@{#438179}

Patch Set 1 : ps #

Patch Set 2 : Addressed comments #

Total comments: 2

Patch Set 3 : Using http stream factory (still need to add tests) #

Total comments: 6

Patch Set 4 : Cleanup, added tests #

Total comments: 23

Patch Set 5 : rch comments #

Total comments: 12

Patch Set 6 : rch comments, moved all the logic to factory #

Total comments: 21

Patch Set 7 : rebased, rch comments #

Total comments: 2

Patch Set 8 : rch comments, add DCHECKs #

Total comments: 7

Patch Set 9 : rch comments #

Total comments: 2

Patch Set 10 : ps #

Patch Set 11 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+371 lines, -3 lines) Patch
M net/http/http_stream_factory_impl.h View 1 2 3 4 5 6 3 chunks +23 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +75 lines, -1 line 0 comments Download
M net/http/http_stream_factory_impl_job.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.cc View 1 2 3 4 5 6 7 3 chunks +11 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_stream_factory_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +238 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 114 (70 generated)
tbansal1
zhongyi: ptal at net/. Thanks.
4 years, 1 month ago (2016-11-21 22:13:59 UTC) #4
Ryan Hamilton
FWIW, we tried disabling preconnect when QUIC is in use and didn't find it to ...
4 years, 1 month ago (2016-11-21 23:39:22 UTC) #7
tbansal1
On 2016/11/21 23:39:22, Ryan Hamilton wrote: > FWIW, we tried disabling preconnect when QUIC is ...
4 years, 1 month ago (2016-11-21 23:49:25 UTC) #8
tbansal1
On 2016/11/21 23:49:25, tbansal1 wrote: > On 2016/11/21 23:39:22, Ryan Hamilton wrote: > > FWIW, ...
4 years, 1 month ago (2016-11-21 23:53:02 UTC) #9
Ryan Hamilton
On 2016/11/21 23:53:02, tbansal1 wrote: > On 2016/11/21 23:49:25, tbansal1 wrote: > > On 2016/11/21 ...
4 years, 1 month ago (2016-11-22 18:57:31 UTC) #10
Ryan Hamilton
On 2016/11/21 23:49:25, tbansal1 wrote: > On 2016/11/21 23:39:22, Ryan Hamilton wrote: > > FWIW, ...
4 years, 1 month ago (2016-11-22 18:58:27 UTC) #11
tbansal1
On 2016/11/22 18:57:31, Ryan Hamilton wrote: > On 2016/11/21 23:53:02, tbansal1 wrote: > > On ...
4 years, 1 month ago (2016-11-22 19:00:10 UTC) #12
tbansal1
On 2016/11/22 18:58:27, Ryan Hamilton wrote: > On 2016/11/21 23:49:25, tbansal1 wrote: > > On ...
4 years, 1 month ago (2016-11-22 19:12:10 UTC) #13
Ryan Hamilton
On 2016/11/22 19:12:10, tbansal1 wrote: > On 2016/11/22 18:58:27, Ryan Hamilton wrote: > > On ...
4 years, 1 month ago (2016-11-22 19:33:42 UTC) #14
tbansal1
On 2016/11/22 19:33:42, Ryan Hamilton wrote: > On 2016/11/22 19:12:10, tbansal1 wrote: > > On ...
4 years, 1 month ago (2016-11-22 19:45:49 UTC) #15
Ryan Hamilton
On 2016/11/22 19:45:49, tbansal1 wrote: > So, there are 2 problems: > 1. Preconnect function ...
4 years, 1 month ago (2016-11-22 20:02:26 UTC) #16
tbansal1
On 2016/11/22 20:02:26, Ryan Hamilton wrote: > On 2016/11/22 19:45:49, tbansal1 wrote: > > So, ...
4 years, 1 month ago (2016-11-22 20:06:09 UTC) #17
Ryan Hamilton
On 2016/11/22 20:06:09, tbansal1 wrote: > On 2016/11/22 20:02:26, Ryan Hamilton wrote: > > On ...
4 years, 1 month ago (2016-11-22 20:10:49 UTC) #18
tbansal1
ptal. Using ProxyDelegate to allow preconnect for the first request, and disabling it for subsequent ...
4 years, 1 month ago (2016-11-22 21:06:12 UTC) #20
Ryan Hamilton
https://codereview.chromium.org/2522703002/diff/60001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2522703002/diff/60001/net/http/http_stream_factory_impl_job_controller.cc#newcode129 net/http/http_stream_factory_impl_job_controller.cc:129: } Instead of checking the proxy delegate, I was ...
4 years, 1 month ago (2016-11-22 22:02:58 UTC) #23
tbansal1
rch: ptal. Thanks. https://codereview.chromium.org/2522703002/diff/60001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2522703002/diff/60001/net/http/http_stream_factory_impl_job_controller.cc#newcode129 net/http/http_stream_factory_impl_job_controller.cc:129: } On 2016/11/22 22:02:58, Ryan Hamilton ...
4 years, 1 month ago (2016-11-23 02:06:03 UTC) #26
Ryan Hamilton
Nice progress! This is looking good. https://codereview.chromium.org/2522703002/diff/80001/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (right): https://codereview.chromium.org/2522703002/diff/80001/net/http/http_stream_factory_impl_job.cc#newcode766 net/http/http_stream_factory_impl_job.cc:766: return ERR_IO_PENDING; Instead ...
4 years, 1 month ago (2016-11-23 04:26:27 UTC) #27
tbansal1
rch: ptal. I did some cleanup, added tests. I have also guarded the code behind ...
4 years ago (2016-11-24 00:10:51 UTC) #30
Ryan Hamilton
Looking great! https://codereview.chromium.org/2522703002/diff/100001/net/http/http_stream_factory.h File net/http/http_stream_factory.h (right): https://codereview.chromium.org/2522703002/diff/100001/net/http/http_stream_factory.h#newcode245 net/http/http_stream_factory.h:245: // Returns true if a preconnection to ...
4 years ago (2016-11-29 00:15:24 UTC) #35
tbansal1
rch: ptal. Thanks. https://codereview.chromium.org/2522703002/diff/100001/net/http/http_stream_factory.h File net/http/http_stream_factory.h (right): https://codereview.chromium.org/2522703002/diff/100001/net/http/http_stream_factory.h#newcode245 net/http/http_stream_factory.h:245: // Returns true if a preconnection ...
4 years ago (2016-11-29 08:25:43 UTC) #48
Ryan Hamilton
https://codereview.chromium.org/2522703002/diff/100001/net/http/http_stream_factory_impl_job.h File net/http/http_stream_factory_impl_job.h (right): https://codereview.chromium.org/2522703002/diff/100001/net/http/http_stream_factory_impl_job.h#newcode107 net/http/http_stream_factory_impl_job.h:107: const HttpRequestInfo& request_info) = 0; On 2016/11/29 08:25:43, tbansal1 ...
4 years ago (2016-11-29 20:47:57 UTC) #49
tbansal1
rch: ptal. I have moved the logic to the factory. https://codereview.chromium.org/2522703002/diff/230001/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (right): https://codereview.chromium.org/2522703002/diff/230001/net/http/http_stream_factory_impl_job.cc#newcode814 ...
4 years ago (2016-12-01 01:43:06 UTC) #52
Ryan Hamilton
https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl.h File net/http/http_stream_factory_impl.h (right): https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl.h#newcode136 net/http/http_stream_factory_impl.h:136: bool OnInitConnection(JobController* controller, const ProxyInfo& proxy_info); Can |controller| be ...
4 years ago (2016-12-01 02:03:36 UTC) #54
tbansal1
rch: ptal thanks. https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl.h File net/http/http_stream_factory_impl.h (right): https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl.h#newcode136 net/http/http_stream_factory_impl.h:136: bool OnInitConnection(JobController* controller, const ProxyInfo& proxy_info); ...
4 years ago (2016-12-02 01:27:31 UTC) #56
Ryan Hamilton
Almost there, I think. https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl_job_controller.cc#newcode172 net/http/http_stream_factory_impl_job_controller.cc:172: void HttpStreamFactoryImpl::JobController::OnStreamReady( On 2016/12/02 01:27:30, ...
4 years ago (2016-12-02 01:47:30 UTC) #59
tbansal1
I will handle other comments later, but wanted to know your thoughts on this before. ...
4 years ago (2016-12-02 02:06:43 UTC) #60
tbansal1
rch: ptal. Thanks. https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl_unittest.cc File net/http/http_stream_factory_impl_unittest.cc (right): https://codereview.chromium.org/2522703002/diff/290001/net/http/http_stream_factory_impl_unittest.cc#newcode1261 net/http/http_stream_factory_impl_unittest.cc:1261: } On 2016/12/02 01:47:30, Ryan Hamilton ...
4 years ago (2016-12-06 01:10:49 UTC) #70
Ryan Hamilton
https://codereview.chromium.org/2522703002/diff/430001/net/http/http_stream_factory_impl_unittest.cc File net/http/http_stream_factory_impl_unittest.cc (right): https://codereview.chromium.org/2522703002/diff/430001/net/http/http_stream_factory_impl_unittest.cc#newcode1229 net/http/http_stream_factory_impl_unittest.cc:1229: for (int num_streams = 1; num_streams < 3; ++num_streams) ...
4 years ago (2016-12-06 20:09:40 UTC) #76
tbansal1
rch: ptal. thanks. https://codereview.chromium.org/2522703002/diff/430001/net/http/http_stream_factory_impl_unittest.cc File net/http/http_stream_factory_impl_unittest.cc (right): https://codereview.chromium.org/2522703002/diff/430001/net/http/http_stream_factory_impl_unittest.cc#newcode1229 net/http/http_stream_factory_impl_unittest.cc:1229: for (int num_streams = 1; num_streams ...
4 years ago (2016-12-07 00:59:34 UTC) #77
Ryan Hamilton
lgtm https://codereview.chromium.org/2522703002/diff/430001/net/http/http_stream_factory_impl_unittest.cc File net/http/http_stream_factory_impl_unittest.cc (right): https://codereview.chromium.org/2522703002/diff/430001/net/http/http_stream_factory_impl_unittest.cc#newcode1278 net/http/http_stream_factory_impl_unittest.cc:1278: peer.SetClientSocketPoolManager(std::move(mock_pool_manager)); On 2016/12/07 00:59:34, tbansal1 wrote: > On ...
4 years ago (2016-12-07 20:07:10 UTC) #78
tbansal1
rkaplow: ptal at histograms.xml. Thanks.
4 years ago (2016-12-07 20:18:12 UTC) #80
tbansal1
Cleaning up the list of reviewers: Moved zhongyi@ to cc.
4 years ago (2016-12-07 20:39:19 UTC) #82
rkaplow
https://codereview.chromium.org/2522703002/diff/450001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2522703002/diff/450001/net/http/http_stream_factory_impl.cc#newcode271 net/http/http_stream_factory_impl.cc:271: UMA_HISTOGRAM_COUNTS_100("Net.PreconnectSkippedToProxyServers", 1); this means you will only be emitting ...
4 years ago (2016-12-07 21:24:42 UTC) #83
tbansal1
rkaplow: ptal. thanks. https://codereview.chromium.org/2522703002/diff/450001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2522703002/diff/450001/net/http/http_stream_factory_impl.cc#newcode271 net/http/http_stream_factory_impl.cc:271: UMA_HISTOGRAM_COUNTS_100("Net.PreconnectSkippedToProxyServers", 1); On 2016/12/07 21:24:42, rkaplow ...
4 years ago (2016-12-07 23:16:30 UTC) #86
rkaplow
lgtm
4 years ago (2016-12-12 16:59:13 UTC) #89
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522703002/470001
4 years ago (2016-12-12 17:41:14 UTC) #92
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/197334)
4 years ago (2016-12-12 20:44:44 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522703002/470001
4 years ago (2016-12-13 00:03:18 UTC) #96
commit-bot: I haz the power
Failed to apply patch for net/http/http_stream_factory_impl_unittest.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-13 03:33:42 UTC) #98
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522703002/470001
4 years ago (2016-12-13 03:47:40 UTC) #100
commit-bot: I haz the power
Failed to apply patch for net/http/http_stream_factory_impl_unittest.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-13 03:53:31 UTC) #102
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522703002/490001
4 years ago (2016-12-13 15:54:18 UTC) #109
commit-bot: I haz the power
Committed patchset #11 (id:490001)
4 years ago (2016-12-13 16:00:35 UTC) #112
commit-bot: I haz the power
4 years ago (2016-12-13 16:03:24 UTC) #114
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/0844a896c0334b3541315e79d1048789ea14cc71
Cr-Commit-Position: refs/heads/master@{#438179}

Powered by Google App Engine
This is Rietveld 408576698