Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
55c66a63
Unverified
Commit
55c66a63
authored
Nov 19, 2025
by
Biswa Panda
Committed by
GitHub
Nov 20, 2025
Browse files
fix: same endpoint for tcp health check (#4494)
parent
75bf7c9b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
38 deletions
+12
-38
examples/backends/vllm/launch/agg_request_planes.sh
examples/backends/vllm/launch/agg_request_planes.sh
+1
-0
lib/runtime/src/component/endpoint.rs
lib/runtime/src/component/endpoint.rs
+11
-38
No files found.
examples/backends/vllm/launch/agg_request_planes.sh
View file @
55c66a63
...
@@ -44,4 +44,5 @@ echo "Using request plane mode: $REQUEST_PLANE"
...
@@ -44,4 +44,5 @@ echo "Using request plane mode: $REQUEST_PLANE"
python
-m
dynamo.frontend
--http-port
=
8000 &
python
-m
dynamo.frontend
--http-port
=
8000 &
DYN_SYSTEM_PORT
=
8081
\
DYN_SYSTEM_PORT
=
8081
\
DYN_HEALTH_CHECK_ENABLED
=
true
\
python
-m
dynamo.vllm
--model
Qwen/Qwen3-0.6B
--enforce-eager
--connector
none
python
-m
dynamo.vllm
--model
Qwen/Qwen3-0.6B
--enforce-eager
--connector
none
lib/runtime/src/component/endpoint.rs
View file @
55c66a63
...
@@ -126,12 +126,7 @@ impl EndpointConfigBuilder {
...
@@ -126,12 +126,7 @@ impl EndpointConfigBuilder {
// Register health check target in SystemHealth if provided
// Register health check target in SystemHealth if provided
if
let
Some
(
health_check_payload
)
=
&
health_check_payload
{
if
let
Some
(
health_check_payload
)
=
&
health_check_payload
{
// Build transport based on request plane mode
// Build transport based on request plane mode
let
transport
=
build_transport_type
(
let
transport
=
build_transport_type
(
request_plane_mode
,
&
endpoint_name
,
&
subject
);
request_plane_mode
,
&
endpoint_name
,
&
subject
,
TransportContext
::
HealthCheck
,
);
let
instance
=
Instance
{
let
instance
=
Instance
{
component
:
component_name
.clone
(),
component
:
component_name
.clone
(),
...
@@ -237,12 +232,7 @@ impl EndpointConfigBuilder {
...
@@ -237,12 +232,7 @@ impl EndpointConfigBuilder {
let
discovery
=
endpoint
.drt
()
.discovery
();
let
discovery
=
endpoint
.drt
()
.discovery
();
// Build transport for discovery service based on request plane mode
// Build transport for discovery service based on request plane mode
let
transport
=
build_transport_type
(
let
transport
=
build_transport_type
(
request_plane_mode
,
&
endpoint_name
,
&
subject
);
request_plane_mode
,
&
endpoint_name
,
&
subject
,
TransportContext
::
Discovery
,
);
let
discovery_spec
=
crate
::
discovery
::
DiscoverySpec
::
Endpoint
{
let
discovery_spec
=
crate
::
discovery
::
DiscoverySpec
::
Endpoint
{
namespace
:
namespace_name
.clone
(),
namespace
:
namespace_name
.clone
(),
...
@@ -270,31 +260,21 @@ impl EndpointConfigBuilder {
...
@@ -270,31 +260,21 @@ impl EndpointConfigBuilder {
}
}
}
}
/// Context for building transport type - determines port and formatting differences
/// Build transport type based on request plane mode
enum
TransportContext
{
/// For health check targets
HealthCheck
,
/// For discovery service registration
Discovery
,
}
/// Build transport type based on request plane mode and context
///
///
/// This
unified
function handles both health check and discovery transport building
,
/// This function handles both health check and discovery transport building
.
///
with context-specific differences
:
///
All transport modes use consistent addressing
:
/// - HTTP:
Both use the same port (default 8888, configurable via DYN_HTTP_RPC_PORT
)
/// - HTTP:
Uses full URL path including endpoint name (e.g., http://host:port/v1/rpc/endpoint_name
)
/// - TCP:
Health check omits endpoint suffix, discovery includes it for routing
/// - TCP:
Includes endpoint name for routing (e.g., host:port/endpoint_name)
/// - NATS:
Identical for both contexts
/// - NATS:
Uses subject-based addressing (unique per endpoint)
fn
build_transport_type
(
fn
build_transport_type
(
mode
:
RequestPlaneMode
,
mode
:
RequestPlaneMode
,
endpoint_name
:
&
str
,
endpoint_name
:
&
str
,
subject
:
&
str
,
subject
:
&
str
,
context
:
TransportContext
,
)
->
TransportType
{
)
->
TransportType
{
match
mode
{
match
mode
{
RequestPlaneMode
::
Http
=>
{
RequestPlaneMode
::
Http
=>
{
let
http_host
=
crate
::
utils
::
get_http_rpc_host_from_env
();
let
http_host
=
crate
::
utils
::
get_http_rpc_host_from_env
();
// Both health check and discovery use the same port (8888) where the HTTP server binds
let
http_port
=
std
::
env
::
var
(
"DYN_HTTP_RPC_PORT"
)
let
http_port
=
std
::
env
::
var
(
"DYN_HTTP_RPC_PORT"
)
.ok
()
.ok
()
.and_then
(|
p
|
p
.parse
::
<
u16
>
()
.ok
())
.and_then
(|
p
|
p
.parse
::
<
u16
>
()
.ok
())
...
@@ -316,16 +296,9 @@ fn build_transport_type(
...
@@ -316,16 +296,9 @@ fn build_transport_type(
.and_then
(|
p
|
p
.parse
::
<
u16
>
()
.ok
())
.and_then
(|
p
|
p
.parse
::
<
u16
>
()
.ok
())
.unwrap_or
(
9999
);
.unwrap_or
(
9999
);
let
tcp_endpoint
=
match
context
{
// Include endpoint name for proper TCP routing
TransportContext
::
HealthCheck
=>
{
// TCP client parses this format and adds x-endpoint-path header for server-side routing
// Health check uses simple host:port format
let
tcp_endpoint
=
format!
(
"{}:{}/{}"
,
tcp_host
,
tcp_port
,
endpoint_name
);
format!
(
"{}:{}"
,
tcp_host
,
tcp_port
)
}
TransportContext
::
Discovery
=>
{
// Discovery includes endpoint name for routing
format!
(
"{}:{}/{}"
,
tcp_host
,
tcp_port
,
endpoint_name
)
}
};
TransportType
::
Tcp
(
tcp_endpoint
)
TransportType
::
Tcp
(
tcp_endpoint
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment