Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion py_src/vllm_router/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Router:
health_failure_threshold: Number of consecutive health check failures before marking worker unhealthy. Default: 3
health_success_threshold: Number of consecutive health check successes before marking worker healthy. Default: 2
health_check_timeout_secs: Timeout in seconds for health check requests. Default: 5
health_check_interval_secs: Interval in seconds between runtime health checks. Default: 60
health_check_interval_secs: Interval in seconds between runtime health checks. Default: 20
health_check_endpoint: Health check endpoint path. Default: '/health'
"""

Expand Down
2 changes: 1 addition & 1 deletion py_src/vllm_router/router_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class RouterArgs:
health_failure_threshold: int = 3
health_success_threshold: int = 2
health_check_timeout_secs: int = 5
health_check_interval_secs: int = 60
health_check_interval_secs: int = 20
health_check_endpoint: str = "/health"
# Circuit breaker configuration
cb_failure_threshold: int = 10
Expand Down
2 changes: 1 addition & 1 deletion src/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl Default for HealthCheckConfig {
failure_threshold: 3,
success_threshold: 2,
timeout_secs: 5,
check_interval_secs: 60,
check_interval_secs: 20,
endpoint: "/health".to_string(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/worker_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ impl WorkerRegistry {

let handle = tokio::spawn(async move {
const LOAD_RESET_INTERVAL: u64 = 10;
const MODEL_REFRESH_INTERVAL: u64 = 5;
const MODEL_REFRESH_INTERVAL: u64 = 1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High core/worker_registry.rs:477

Health checks are continuously delayed when multiple /v1/models requests stall, so failed workers can remain marked healthy and continue receiving traffic. With MODEL_REFRESH_INTERVAL set to 1, every health-check cycle performs sequential discovery requests, each potentially taking five seconds; restore the less frequent refresh interval (or decouple discovery from health checks).

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @src/core/worker_registry.rs around line 477:

Health checks are continuously delayed when multiple `/v1/models` requests stall, so failed workers can remain marked healthy and continue receiving traffic. With `MODEL_REFRESH_INTERVAL` set to `1`, every health-check cycle performs sequential discovery requests, each potentially taking five seconds; restore the less frequent refresh interval (or decouple discovery from health checks).


let mut interval =
tokio::time::interval(tokio::time::Duration::from_secs(check_interval_secs));
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl Router {
health_failure_threshold = 3,
health_success_threshold = 2,
health_check_timeout_secs = 5,
health_check_interval_secs = 60,
health_check_interval_secs = 20,
health_check_endpoint = String::from("/health"),
// IGW defaults
enable_igw = false,
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ struct CliArgs {
health_check_timeout_secs: u64,

/// Interval in seconds between runtime health checks
#[arg(long, default_value_t = 60)]
#[arg(long, default_value_t = 20)]
health_check_interval_secs: u64,

/// Health check endpoint path
Expand Down
Loading