Skip to content

Add queue-mode serverless scaling support to SDK and CLI - #495

Draft
LucasArmandVast wants to merge 5 commits into
masterfrom
queue-scaling-sdk
Draft

Add queue-mode serverless scaling support to SDK and CLI#495
LucasArmandVast wants to merge 5 commits into
masterfrom
queue-scaling-sdk

Conversation

@LucasArmandVast

Copy link
Copy Markdown
Contributor
  • RouteResponse: surface autoscaler queue-mode responses as QUEUED with queue_position/queue_depth (READY still keyed on url presence)
  • Endpoint.submit() / Endpoint.task_status(): explicit submit-then-poll helpers over the existing /route/ protocol
  • vastai create/update endpoint: --scaling_mode, --scaler, --requests_per_worker, --queue_delay_target, --idle_timeout, --cold_ttl build the endpoint scaling_config
  • tests for QUEUED parsing and submit/task_status delegation

- RouteResponse: surface autoscaler queue-mode responses as QUEUED with
  queue_position/queue_depth (READY still keyed on url presence)
- Endpoint.submit() / Endpoint.task_status(): explicit submit-then-poll
  helpers over the existing /route/ protocol
- vastai create/update endpoint: --scaling_mode, --scaler,
  --requests_per_worker, --queue_delay_target, --idle_timeout, --cold_ttl
  build the endpoint scaling_config
- tests for QUEUED parsing and submit/task_status delegation
…ast.py changes

- vastai/api/endpoints.py: create_endpoint/update_endpoint accept a
  scaling_config dict passed through to /endptjobs/
- vastai/cli/commands/endpoints.py: --scaling_mode/--scaler/
  --requests_per_worker/--queue_delay_target/--idle_timeout/--cold_ttl
  on create/update endpoint, built into scaling_config
- vast.py restored to master (deprecated shim, no new features)
- CLI blob tests for scaling_config construction
Long-running worker requests are silent for minutes while the model
computes; NAT/conntrack idle timeouts on the path reap those connections,
the pyworker sees a client disconnect and cancels the task, and the SDK
re-routes and restarts the work in a loop. Observed live with 300s tasks
dying every ~80-90s. socket_factory sets SO_KEEPALIVE with 30s idle /
15s interval / 8 probes so the kernel keeps the path warm; degrades with
a warning on aiohttp versions without socket_factory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant