Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions charts/model-engine/templates/istio-virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ spec:
port:
number: 80
retries:
attempts: 3
retryOn: connect-failure,unavailable,gateway-error
attempts: {{ ((.Values.virtualservice).retries).attempts | default 3 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Cursor Fix in Claude Code Fix in Codex

{{- /* 503 is deliberately not retried: it is the overload signal, and retrying
it multiplies offered load exactly when the fleet is saturated. Numeric
codes in retryOn map to Envoy retriable-status-codes. */}}
retryOn: {{ ((.Values.virtualservice).retries).retryOn | default "connect-failure,unavailable,502,504" | quote }}
{{- with ((.Values.virtualservice).retries).perTryTimeout }}
perTryTimeout: {{ . }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/model-engine/values_sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ virtualservice:
- llm-engine.domain.com
gateways:
- default/internal-gateway
# retries [optional] Envoy retry policy for the gateway route. 503 is excluded from
# the default retryOn because retrying the overload signal amplifies offered load.
# perTryTimeout is unset by default: the route also carries streaming and other
# long-lived requests, which a per-try timeout would abort mid-flight.
retries:
attempts: 3
retryOn: connect-failure,unavailable,502,504
perTryTimeout: null

hostDomain:
prefix: http://
Expand Down