Skip to content
5 changes: 0 additions & 5 deletions python/ray/serve/_private/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,6 @@
"RAY_SERVE_MIN_HANDLE_METRICS_TIMEOUT_S", 10.0
)

# Feature flag to always run a proxy on the head node even if it has no replicas.
RAY_SERVE_ALWAYS_RUN_PROXY_ON_HEAD_NODE = get_env_bool(
"RAY_SERVE_ALWAYS_RUN_PROXY_ON_HEAD_NODE", "1"
)

# Default is 2GiB, the max for a signed int.
RAY_SERVE_GRPC_MAX_MESSAGE_SIZE = get_env_int(
"RAY_SERVE_GRPC_MAX_MESSAGE_SIZE", (2 * 1024 * 1024 * 1024) - 1
Expand Down
5 changes: 0 additions & 5 deletions python/ray/serve/_private/proxy_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
PROXY_HEALTH_CHECK_TIMEOUT_S,
PROXY_HEALTH_CHECK_UNHEALTHY_THRESHOLD,
PROXY_READY_CHECK_TIMEOUT_S,
RAY_SERVE_ALWAYS_RUN_PROXY_ON_HEAD_NODE,
RAY_SERVE_ENABLE_TASK_EVENTS,
REPLICA_STARTUP_SHUTDOWN_LATENCY_BUCKETS_MS,
SERVE_LOGGER_NAME,
Expand Down Expand Up @@ -691,10 +690,6 @@ def update(self, proxy_nodes: Set[NodeId] = None) -> Set[str]:
if proxy_nodes is None:
proxy_nodes = set()

# Ensure head node always has a proxy (unless FF'd off).
if RAY_SERVE_ALWAYS_RUN_PROXY_ON_HEAD_NODE:
proxy_nodes.add(self._head_node_id)

target_nodes = self._get_target_nodes(proxy_nodes)
target_node_ids = {node_id for node_id, _, _ in target_nodes}

Expand Down
10 changes: 5 additions & 5 deletions python/ray/serve/tests/unit/test_proxy_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_proxy_state_manager_restarts_unhealthy_proxies(all_nodes):

cluster_node_info_cache.alive_nodes = all_nodes
# First iteration, refresh state
proxy_state_manager.update()
proxy_state_manager.update(proxy_nodes={HEAD_NODE_ID})

prev_proxy_state = proxy_state_manager._proxy_states[HEAD_NODE_ID]
# Mark existing head-node proxy UNHEALTHY
Expand All @@ -212,7 +212,7 @@ def test_proxy_state_manager_restarts_unhealthy_proxies(all_nodes):

# Continuously trigger update and wait for status to be changed to HEALTHY.
for _ in range(1):
proxy_state_manager.update(proxy_nodes=set(HEAD_NODE_ID))
proxy_state_manager.update(proxy_nodes={HEAD_NODE_ID})
# Advance timer by 5 (to perform a health-check)
timer.advance(5)

Expand Down Expand Up @@ -415,7 +415,7 @@ def test_proxy_manager_update_proxies_states(all_nodes, number_of_worker_nodes):
node_ids = [node_id for node_id, _, _ in all_nodes]

# No target proxy nodes
proxy_nodes = set()
proxy_nodes = {HEAD_NODE_ID}

# Head node proxy should continue to be HEALTHY.
# Worker node proxy should turn DRAINING.
Expand Down Expand Up @@ -533,7 +533,7 @@ def test_proxy_actor_manager_removing_proxies(all_nodes, number_of_worker_nodes)
N = 10
for _ in range(N):
manager.update(
proxy_nodes=set(),
proxy_nodes={HEAD_NODE_ID},
)
timer.advance(5)
# Assert that
Expand All @@ -550,7 +550,7 @@ def test_proxy_actor_manager_removing_proxies(all_nodes, number_of_worker_nodes)
# Reconcile proxies with empty set of target nodes (worker node proxy
# will be shutdown by now)
manager.update(
proxy_nodes=set(),
proxy_nodes={HEAD_NODE_ID},
)

assert len(manager._proxy_states) == 1
Expand Down