Explore direct gateway-to-fiber routing without an extra proxy hop
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- kubernetes, rust
調査の方向性
Start by tracing the current request path through Kourier, fiber-router, and Fiberd, then identify the supported routing and lifecycle hooks available in the project’s gateway setup. Compare the listed approaches against the two-proxy baseline for cold and warm latency, throughput, resources, failure handling, and operational complexity. Prototype the smallest supported integration and demonstrate the actual traffic path; done means recording a recommendation with its limitations, including whether the existing proxy hop should remain.
索引モデルが issue の本文から書いたものです。
説明
Problem
The current Fiberd integration sends every application request through two HTTP proxies:
Client → Kourier gateway → Lampyr fiber-router → application fiber
This also applies when the request uses a warm, reusable fiber. fiber-router selects the revision, acquires or reuses a fiber through Fiberd's public Clone/Release protocol, then proxies the application request and response. Fiberd itself is not in the HTTP data path.
Important distinction: reuse already exists
A Lampyr Service can opt into fiber reuse in its manifest:
execution:
mode: reuse
idleTimeout: 30s
Fresh-per-request remains the default. In reuse mode, fiber-router reuses fibers for that revision between requests and releases idle fibers after the configured timeout. This avoids creating a new fiber for every warm request; it does not bypass fiber-router or Kourier. Every application request still traverses both HTTP proxies.
This issue is specifically about whether application traffic can skip the extra fiber-router proxy hop while preserving the existing activation, authorization, isolation, and lifecycle behavior. It is not a request to add the reuse manifest option; that option is already implemented.
Related: Lampyr's remaining Knative dependencies are a separate question. The routing decision and the Knative installation decision are related, but neither automatically settles the other.
Possible solutions
1. Keep the current path; treat reuse as the warm-request optimization
Client → Kourier → fiber-router → existing reusable fiber
This requires no new routing or endpoint-publication machinery. Reuse already avoids a fresh fiber creation for eligible warm requests, while fiber-router retains control over capacity, revision selection, request completion, streams, WebSockets, and idle cleanup.
Trade-off: the extra HTTP proxy hop remains. Measure its actual latency/resource cost against the operational and correctness cost of alternatives before taking on a more complex design.
2. Bypass fiber-router for warm reusable fibers
Cold / no published endpoint: Client → Kourier → fiber-router → fiber
Warm / published endpoint: Client → Kourier ───────────────→ fiber
Keep fiber-router responsible for activation and lifecycle, but publish healthy reusable-fiber endpoints to the gateway and let the gateway route warm traffic directly. Return traffic to the activation path when an endpoint is unavailable or draining.
This is primarily applicable to reuse mode; fresh-per-request requests still need per-request acquisition and completion tracking. Investigate whether stock Kourier and its supported configuration can route to per-fiber endpoints, how endpoint publication/readiness and internal Service addresses would work, and whether any required hooks are actually supported without upstream patches.
Trade-offs: can remove a proxy hop on warm traffic, but adds endpoint publication, asynchronous route propagation, stale-endpoint handling, and draining. It also needs reliable in-flight/activity signals so idle cleanup never releases a fiber serving a request, stream, or WebSocket. A route update means bypass is not guaranteed on the literal next request.
3. Use one activation-aware gateway
Client → gateway → fiber
│
└─ control calls → activation service / Fiberd
Use a gateway with supported extension points to acquire/select the fiber and forward the application request directly to its endpoint. The activation component can remain, but handles control messages rather than relaying request/response bodies.
This could support both fresh-per-request and reuse if the gateway can reliably couple acquisition and release to request completion, cancellation, stream completion, and WebSocket closure. Verify supported endpoint-selection and completion hooks; an authorization filter alone should not be assumed sufficient, and stock Kourier should not be assumed to provide these hooks.
Trade-offs: one application HTTP proxy and no per-request Kubernetes reconciliation, but requires gateway-specific integration and robust lifecycle behavior.
4. Make fiber-router the sole application gateway
Expose the existing router as the HTTP/TLS ingress and remove the preceding application-level Kourier hop, while retaining its Fiberd acquisition and completion tracking.
Trade-offs: potentially the simplest lifecycle model, but Lampyr would own more gateway responsibilities: TLS/certificate management, public ingress exposure, routing readiness, observability, and hardened public-server behavior. Compare that burden with extending an established gateway.
Requirements whichever option we choose
- Preserve default fresh-per-request isolation and release at request completion. A fresh request must not attach to a prior request's fiber.
- Preserve optional reuse, capacity/concurrency enforcement, weighted revision selection, and protected Grant authorization/revocation.
- Never idle-release fibers while requests, streams, or WebSockets are active.
- Handle cancellation, fiber/home crashes, gateway restarts, stale endpoints, route propagation races, and draining before release.
- Keep HTTP, streaming, WebSockets, internal service addresses, TLS, and optional Broker/Event Grid delivery working on Kind and AKS.
- Do not patch Fiberd, Knative, or Kourier, or reintroduce their source submodules.
Investigation / outcome
Compare viable options against today's two-proxy baseline for cold and warm latency, throughput, resource use, failure behavior, and operational complexity. Prototype the smallest supported integration and demonstrate the actual traffic path, not just a route configuration change.
Record a recommendation and its limitations before implementation. If keeping the extra proxy is the best trade-off, document why rather than treating it as an unavoidable requirement of Fiberd.
- 主要言語
- Rust
- スター
- 3
- フォーク
- 2
- 平均マージ
- 3日 57分
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperlight-dev/lampyr のほかの issue
-
a-needs-info dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
hyperlight-dev/lampyr#49 ·
メンテナーはふだん 4 日以内に返信
-
a-needs-info
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hyperlight-dev/lampyr#34 ·
メンテナーはふだん 4 日以内に返信
-
Provision production AKS ingress DNS and TLS対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
hyperlight-dev/lampyr#76 ·
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
hyperlight-dev/lampyr#75 ·
メンテナーはふだん 4 日以内に返信
-
a-needs-info enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
hyperlight-dev/lampyr#55 ·
メンテナーはふだん 4 日以内に返信
hyperlight-dev/lampyr の issue をすべて見る
似ている issue
-
bug P2: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
tests
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vfarcic/dot-agent-deck#2512 ·
メンテナーはふだん 1 日以内に返信