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"
python
-m
dynamo.frontend
--http-port
=
8000 &
DYN_SYSTEM_PORT
=
8081
\
DYN_HEALTH_CHECK_ENABLED
=
true
\
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 {
// Register health check target in SystemHealth if provided
if
let
Some
(
health_check_payload
)
=
&
health_check_payload
{
// Build transport based on request plane mode
let
transport
=
build_transport_type
(
request_plane_mode
,
&
endpoint_name
,
&
subject
,
TransportContext
::
HealthCheck
,
);
let
transport
=
build_transport_type
(
request_plane_mode
,
&
endpoint_name
,
&
subject
);
let
instance
=
Instance
{
component
:
component_name
.clone
(),
...
...
@@ -237,12 +232,7 @@ impl EndpointConfigBuilder {
let
discovery
=
endpoint
.drt
()
.discovery
();
// Build transport for discovery service based on request plane mode
let
transport
=
build_transport_type
(
request_plane_mode
,
&
endpoint_name
,
&
subject
,
TransportContext
::
Discovery
,
);
let
transport
=
build_transport_type
(
request_plane_mode
,
&
endpoint_name
,
&
subject
);
let
discovery_spec
=
crate
::
discovery
::
DiscoverySpec
::
Endpoint
{
namespace
:
namespace_name
.clone
(),
...
...
@@ -270,31 +260,21 @@ impl EndpointConfigBuilder {
}
}
/// Context for building transport type - determines port and formatting differences
enum
TransportContext
{
/// For health check targets
HealthCheck
,
/// For discovery service registration
Discovery
,
}
/// Build transport type based on request plane mode and context
/// Build transport type based on request plane mode
///
/// This
unified
function handles both health check and discovery transport building
,
///
with context-specific differences
:
/// - HTTP:
Both use the same port (default 8888, configurable via DYN_HTTP_RPC_PORT
)
/// - TCP:
Health check omits endpoint suffix, discovery includes it for routing
/// - NATS:
Identical for both contexts
/// This function handles both health check and discovery transport building
.
///
All transport modes use consistent addressing
:
/// - HTTP:
Uses full URL path including endpoint name (e.g., http://host:port/v1/rpc/endpoint_name
)
/// - TCP:
Includes endpoint name for routing (e.g., host:port/endpoint_name)
/// - NATS:
Uses subject-based addressing (unique per endpoint)
fn
build_transport_type
(
mode
:
RequestPlaneMode
,
endpoint_name
:
&
str
,
subject
:
&
str
,
context
:
TransportContext
,
)
->
TransportType
{
match
mode
{
RequestPlaneMode
::
Http
=>
{
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"
)
.ok
()
.and_then
(|
p
|
p
.parse
::
<
u16
>
()
.ok
())
...
...
@@ -316,16 +296,9 @@ fn build_transport_type(
.and_then
(|
p
|
p
.parse
::
<
u16
>
()
.ok
())
.unwrap_or
(
9999
);
let
tcp_endpoint
=
match
context
{
TransportContext
::
HealthCheck
=>
{
// Health check uses simple host:port format
format!
(
"{}:{}"
,
tcp_host
,
tcp_port
)
}
TransportContext
::
Discovery
=>
{
// Discovery includes endpoint name for routing
format!
(
"{}:{}/{}"
,
tcp_host
,
tcp_port
,
endpoint_name
)
}
};
// Include endpoint name for proper TCP routing
// TCP client parses this format and adds x-endpoint-path header for server-side routing
let
tcp_endpoint
=
format!
(
"{}:{}/{}"
,
tcp_host
,
tcp_port
,
endpoint_name
);
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