feat(us-016): tracker route for HF models, endpoint dedup, purge logging
Tracker /v1/route now resolves HF model nodes (by hf_repo or short name) in addition to preset models, using the same greedy interval-cover logic. This allows distributed inference routing across two nodes each holding half the model. Endpoint dedup: re-registering the same endpoint atomically replaces the old entry so stale registrations don't accumulate across node restarts. Purge logging: tracker now prints when a node expires due to missed heartbeats so operators can see dead nodes being removed. Timing fix: heartbeat timeout raised from 30s to 90s (3 missed beats); node heartbeat interval lowered from 30s to 20s to maintain margin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ def _get_json(url: str, timeout: float = 10.0) -> dict:
|
||||
return json.loads(r.read())
|
||||
|
||||
|
||||
def _start_heartbeat(tracker_url: str, node_id: str, interval: float = 30.0) -> threading.Thread:
|
||||
def _start_heartbeat(tracker_url: str, node_id: str, interval: float = 20.0) -> threading.Thread:
|
||||
"""Daemon thread that sends periodic heartbeats to the tracker."""
|
||||
def _loop() -> None:
|
||||
hb_url = f"{tracker_url}/v1/nodes/{node_id}/heartbeat"
|
||||
|
||||
Reference in New Issue
Block a user