Explore direct gateway-to-fiber routing without an extra proxy hop
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kubernetes, rust
- Lĩnh vực
- infrastructure, networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 3
- Fork
- 2
- Merge trung bình
- 3 ngày 57 phút
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/lampyr
-
a-needs-info dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
hyperlight-dev/lampyr#49 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
a-needs-info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
hyperlight-dev/lampyr#34 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Provision production AKS ingress DNS and TLSCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
hyperlight-dev/lampyr#76 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
hyperlight-dev/lampyr#75 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
a-needs-info enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
hyperlight-dev/lampyr#55 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của hyperlight-dev/lampyr
Issue tương tự
-
bug P2: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
-
tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vfarcic/dot-agent-deck#2512 ·
Maintainer thường phản hồi trong vòng 1 ngày