diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-04 17:14:50 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-04 17:14:50 +0200 |
commit | a978f4d66a9be2ef87b76aa165cb4bdce86992b7 (patch) | |
tree | 94dfbb612d238104354fff03ba9f9578e6addb5b | |
parent | 580184a0d5f1a7e88199d17800f7a6248dd2bab4 (diff) |
When trottled we need to back down further.
3 files changed, 1 insertions, 7 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java index b3dac336919..951a1776b6f 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java @@ -69,11 +69,6 @@ public class DynamicThrottler extends StaticThrottler { } @Override - public void throttled(long inflight) { - super.throttled(inflight); - } - - @Override public long targetInflight() { return min(super.targetInflight(), targetInflight.get()); } diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java index 4c8a4976a83..a495efd87eb 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java @@ -158,7 +158,6 @@ class HttpRequestStrategy implements RequestStrategy { return false; } - if (response.code() == 429) { // Throttling; reduce target inflight. logResponse(FINER, response, request, attempt); throttler.throttled((inflight.get() - delayedCount.get())); diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/StaticThrottler.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/StaticThrottler.java index cc4e5edd135..9010b0a7ad8 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/StaticThrottler.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/StaticThrottler.java @@ -21,7 +21,7 @@ public class StaticThrottler implements Throttler { private final AtomicLong targetX10; public StaticThrottler(FeedClientBuilderImpl builder) { - minInflight = 8L * builder.connectionsPerEndpoint * builder.endpoints.size(); + minInflight = 2L * builder.connectionsPerEndpoint * builder.endpoints.size(); maxInflight = 256 * minInflight; // 4096 max streams per connection on the server side. targetX10 = new AtomicLong(10 * maxInflight); // 10x the actual value to allow for smaller updates. } |