Scale out a Revision across multiple CapacityGrant home Pods

Aperta
#9 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
kubernetes, rust

Direzione di ricerca

Start with the linked upstream scaling guidance and trace Lampyr's Revision reconciler, ly scale, and fiber-router routing paths. Map how CapacityGrants, home readiness, and endpoints are currently discovered and owned. Done means demonstrating multiple homes for one Revision, spillover, failure isolation, safe scale-in, aggregate status, and cleanup on Kind and AKS while preserving optional Eventing delivery.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

a-human-needed
Goal

When one home is saturated, add another home Pod with its own fiber capacity and distribute requests across both. Use the upstream CapacityGrant model rather than adding replicas to one Grant or introducing another Grant abstraction.

Current behavior

Lampyr uses one home Pod and signed Grant per upstream fiberd.io/v1alpha1 CapacityGrant. Lampyr currently creates one CapacityGrant per immutable Revision, and fiber-router resolves one home endpoint for that Revision.

ly scale --max-fibers changes the existing Grant's authorized fiber limit. It does not add a home Pod or increase its CPU/memory resources. At capacity, requests are shed; there is no automatic home creation or spillover.

Upstream model

The reference controller already supports scale-out through additional CapacityGrants:

  1. A platform component creates another CapacityGrant.
  2. The upstream controller creates its home Pod and signed JWT.
  3. Kubernetes schedules the Pod; Fiberd warms it and publishes readiness.
  4. The platform adds that home's control endpoint to Clone routing.

The reference controller is not an autoscaler and creates individual grant Pods, not a Deployment/ReplicaSet with a replica count.

Reference: https://github.com/helayoty/fiberd/blob/6e58535675df/docs/operating-kubernetes.md#scaling-out

Work to design
  • Allow one Revision to have multiple independently owned CapacityGrants/homes serving the same immutable artifact and execution policy. Define ownership and revision labels for discovery and cleanup.
  • Extend routing to select among admitted, ordinarily Ready home Pods, using actual capacity/pressure signals. Handle SHED, unavailable homes and endpoint changes without blindly retrying a request already delivered to a fiber.
  • Preserve fresh-per-request isolation and revision-scoped reuse. Retained reusable fibers remain associated with their owning home; adding another home does not imply shared application memory or user affinity.
  • Define aggregate capacity separately from per-home fiber limits and Pod resource requests/limits. Raising a fiber limit alone must not be presented as additional physical resources.
  • Provide safe scale-in: stop assigning new work, drain requests/streams/WebSockets and retained fibers, then delete the CapacityGrant so its owned Pod/Secret are collected.
  • Wire status, logs, audit, scale, delete, health and uninstall across all homes of a Revision, including restart recovery and in-flight scale operations.
Implementation options

Start with explicit/manual home-count scale-out to validate placement, routing and draining. Then evaluate automatic scale-out using sustained saturation/pressure, bounded min/max homes, hysteresis and cooldowns. Do not assume Kubernetes CPU utilization alone captures fiber admission capacity.

Review ly scale semantics against the upstream guidance: grant-policy changes can alter ledger authority without rebuilding the warmed runtime/resource boundary. Prefer creating replacement/additional Grants where necessary instead of assuming all policy fields are safely mutable in place.

Completion criteria

Demonstrate two or more homes serving one Revision, saturated-home spillover, aggregate status, one-home failure isolation, safe scale-in with long-lived streams, and full cleanup on Kind and AKS. Keep Fiberd/Knative unmodified and preserve optional Eventing delivery.

Coordinate with #8 (direct gateway-to-fiber routing), Lampyr's controller-managed routing (the Revision reconciler), and Lampyr's remaining Knative dependencies. This issue adds the platform scaling/routing layer around the existing upstream controller; it does not require a second custom Grant operator.

Lingua principale
Rust
Stelle
3
Fork
2
Merge medio
3g 57m
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperlight-dev/lampyr

Tutte le issue di hyperlight-dev/lampyr

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.