Chart: exclude 503 from gateway retries and make the retry policy configurable - #866
Closed
lorenzo-norcini-scale wants to merge 1 commit into
Closed
Chart: exclude 503 from gateway retries and make the retry policy configurable#866lorenzo-norcini-scale wants to merge 1 commit into
lorenzo-norcini-scale wants to merge 1 commit into
Conversation
…ry policy configurable gateway-error retried 502/503/504 as a bundle, so during overload every 503 was retried 3 more times, multiplying offered load exactly when the fleet was saturated. The default policy now retries connection failures and 502/504 only, and attempts/retryOn/perTryTimeout are values-configurable. perTryTimeout stays unset by default because the single route also carries streaming and long-lived requests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| retries: | ||
| attempts: 3 | ||
| retryOn: connect-failure,unavailable,gateway-error | ||
| attempts: {{ ((.Values.virtualservice).retries).attempts | default 3 }} |
There was a problem hiding this comment.
Zero retry count is overwritten
When a deployment sets virtualservice.retries.attempts: 0 to disable retries, Helm treats zero as empty and default 3 emits three attempts, causing requests to be retried despite the explicit configuration and potentially restoring load amplification.
Knowledge Base Used: Model-engine deployment and startup
Prompt To Fix With AI
This is a comment left during a code review.
Path: charts/model-engine/templates/istio-virtualservice.yaml
Line: 29
Comment:
**Zero retry count is overwritten**
When a deployment sets `virtualservice.retries.attempts: 0` to disable retries, Helm treats zero as empty and `default 3` emits three attempts, causing requests to be retried despite the explicit configuration and potentially restoring load amplification.
**Knowledge Base Used:** [Model-engine deployment and startup](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/llm-engine/-/docs/deployment-and-startup.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Collaborator
Author
|
Superseded by the consolidated incident-hardening PR: see the PR referencing this one. |
Collaborator
Author
|
Superseded by #868. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
retryOn: connect-failure,unavailable,gateway-errortoretryOn: connect-failure,unavailable,502,504(numeric codes map to Envoy retriable-status-codes). 503 is no longer retried.attempts,retryOn, andperTryTimeoutare now configurable undervirtualservice.retries; the previous values were hardcoded.Why
gateway-errorbundles 502/503/504. 503 is the overload and no-healthy-upstream signal, so retrying it multiplies offered load when the service is least able to absorb it; during the 2026-08-13 incident this roughly 4x-ed traffic at saturation (disabling retries live cut envoy rps 68 to 39). 502/504 remain retried since they are usually transient single-upstream failures.Notes
perTryTimeoutis unset by default: the single catch-all route also carries streaming and long-lived LLM requests, which a per-try timeout would abort and re-send mid-flight.retriesblock entirely would restore Istio's implicit default of 2 attempts, so the block always renders.🤖 Generated with Claude Code
Greptile Summary
The PR removes HTTP 503 from the gateway's default retry policy and exposes the retry count, retry conditions, and optional per-try timeout as Helm values.
Confidence Score: 4/5
The retry-default change is directionally safe, but explicit zero-attempt configurations must be preserved before merging; the Helm values reference should also document the new settings.
The template correctly removes HTTP 503 from its default retry set, but Helm's empty-value semantics cause an explicit
attempts: 0to render as three attempts, defeating an operator's attempt to disable retries.Files Needing Attention: charts/model-engine/templates/istio-virtualservice.yaml and charts/model-engine/values_sample.yaml
Important Files Changed
default 3silently overrides an explicit zero-attempt setting.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix(chart): stop retrying 503 at the gat..." | Re-trigger Greptile
Context used: