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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc

Issue 2363523003: Throttle fetches for data reduction proxy config (Closed)
Patch Set: rebased, addressed bengr comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
index 82c91d572e220f3abd1e04566e6c6f52483856fd..f412bd0835bfd7a9344652340ab4d0e5dc5a64f8 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
@@ -69,13 +69,13 @@ const uint32_t kMaxBackgroundFetchIntervalSeconds = 6 * 60 * 60; // 6 hours.
// This is the default backoff policy used to communicate with the Data
// Reduction Proxy configuration service.
const net::BackoffEntry::Policy kDefaultBackoffPolicy = {
- 0, // num_errors_to_ignore
- 1 * 1000, // initial_delay_ms
- 4, // multiply_factor
- 0.10, // jitter_factor,
- 30 * 60 * 1000, // maximum_backoff_ms
- -1, // entry_lifetime_ms
- true, // always_use_initial_delay
+ 0, // num_errors_to_ignore
+ 30 * 1000, // initial_delay_ms
+ 4, // multiply_factor
+ 0.25, // jitter_factor,
+ 128 * 60 * 1000, // maximum_backoff_ms
+ -1, // entry_lifetime_ms
+ true, // always_use_initial_delay
};
// Extracts the list of Data Reduction Proxy servers to use for HTTP requests.
@@ -397,9 +397,9 @@ DataReductionProxyConfigServiceClient::GetURLFetcherForConfig(
fetcher->SetUploadData("application/x-protobuf", request_body);
DCHECK(url_request_context_getter_);
fetcher->SetRequestContext(url_request_context_getter_);
- // Configure max retries to be at most kMaxRetries times for 5xx errors.
+ // |fetcher| should not retry on 5xx errors since the server may already be
+ // overloaded. Spurious 5xx errors are still retried on exponential backoff.
static const int kMaxRetries = 5;
- fetcher->SetMaxRetriesOn5xx(kMaxRetries);
fetcher->SetAutomaticallyRetryOnNetworkChanges(kMaxRetries);
return fetcher;
}
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698