mirror of
https://github.com/wassname/ray.git
synced 2026-07-07 19:41:45 +08:00
[serve] Pin http proxy to the node that serve.init() is run on (#8436)
This commit is contained in:
@@ -124,12 +124,16 @@ def init(blocking=False,
|
||||
RequestMetadata.ray_serialize,
|
||||
RequestMetadata.ray_deserialize)
|
||||
|
||||
# TODO(edoakes): for now, always start the HTTP proxy on the node that
|
||||
# serve.init() was run on. We should consider making this configurable
|
||||
# in the future.
|
||||
http_node_id = ray.state.current_node_id()
|
||||
master_actor = ServeMaster.options(
|
||||
detached=True,
|
||||
name=SERVE_MASTER_NAME,
|
||||
max_restarts=-1,
|
||||
).remote(queueing_policy.value, policy_kwargs, start_server, http_host,
|
||||
http_port, metric_exporter)
|
||||
).remote(queueing_policy.value, policy_kwargs, start_server, http_node_id,
|
||||
http_host, http_port, metric_exporter)
|
||||
|
||||
if start_server and blocking:
|
||||
block_until_http_ready("http://{}:{}/-/routes".format(
|
||||
|
||||
Reference in New Issue
Block a user