[feature] Support latency-aware routing across providers serving the same model
Maintainer thường phản hồi trong vòng 1 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
- 18/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- backend, backend-api-design
Hướng nghiên cứu
Start with the rate-limit fallback config documented in docs/reference/toml_schema.md (lines 47-61) and the route configuration it describes, then read the provider-selection path that consumes those candidate lists. PR #162 removed the earlier latency-aware router and issue #1307 is the related experiment on inference-serving signals, so read both before proposing a design. Done means an opt-in TOML policy naming a preferred endpoint, eligible alternatives and a latency threshold, with defined hysteresis for returning traffic, leaving existing routes unchanged by default.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A gateway may serve the same model through multiple providers. For example, it may prefer Claude on Google Vertex AI and use Claude on AWS Bedrock as a fallback. The preferred provider can keep returning successful responses even as its queue grows and response times increase.
Switchyard can try another configured candidate after rate-limit retries are exhausted. Operators also need a way to shift new requests when a provider is still available but consistently slow.
Proposed solution
Add an opt-in latency-aware policy for routes with multiple provider endpoints serving the same model. In the route configuration, let operators specify the preferred endpoint, eligible alternatives, and a latency threshold.
Use recent endpoint measurements to steer new requests to an eligible alternative when the preferred endpoint is consistently above the threshold. For streaming, time to first token is a useful starting signal. Use provider-reported queue time where available. Define when traffic can return to the preferred endpoint so that a single slow or fast request does not cause repeated switching.
Alternatives considered
- Ordered fallback on rate limits or errors. This handles failed requests. A latency policy would also handle requests that succeed slowly.
- A separate upstream load balancer. This is the approach recommended in the changelog after removal of the previous latency router. If endpoint selection should remain there, a documented Switchyard integration example for this use case would help operators implement it.
Scope notes
- Start with provider selection for the same model across explicitly configured endpoints.
- The proposed public change is an opt-in policy in the deployment TOML. Existing routes would keep their current behavior by default.
- Assume the endpoints are reachable through API formats Switchyard already supports. Native provider API translation is a separate feature request.
Additional context
- [Current rate-limit fallback configuration](https://github.com/NVIDIA-NeMo/Switchyard/blob/main/docs/reference/toml_schema.md#L47-L61)
- [Removal of the previous latency-aware router](https://github.com/NVIDIA-NeMo/Switchyard/pull/162)
- [Related experiment on using inference-serving signals for routing](https://github.com/NVIDIA-NeMo/Switchyard/issues/1307)
- Ngôn ngữ chính
- Rust
- Star
- 3.7k
- Fork
- 386
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 113
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 NVIDIA-NeMo/Switchyard
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NVIDIA-NeMo/Switchyard#1407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NVIDIA-NeMo/Switchyard#1405 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
NVIDIA-NeMo/Switchyard#1395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] Relay streaming intercept preserves buffered upstream stream flagCó thể đã có người làm @deepujain đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
NVIDIA-NeMo/Switchyard#1367 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement]: llm_classifier capability mode: derive capability_boundary from primary_rule instead of rejecting the verdictCó thể đã có người làm @fede-kamel đã nhận 12 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NVIDIA-NeMo/Switchyard#1334 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA-NeMo/Switchyard
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ardia-browser/ardia#5810 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Settings closes without an error when the config file is read-onlyCó thể đã có người làm @euvoor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
martin-olivier/airgorah#273 ·
Maintainer thường phản hồi trong vòng 14 ngày
-
area/tui platform/macos type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
anomalyco/opencode#67490 · 1 bình luận ·
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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
UIUX の修正Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày