Skip to content

Harden autoscaling and add configurable max_workers override #77

@matburt

Description

@matburt

Context: get_auto_max_workers() computes pool size from memory/CPU. We need robust fallbacks and an ops override.

Acceptance criteria

  • Guard get_auto_max_workers() against failures from get_mem_in_bytes()/get_cpu_count(); fallback to a safe minimum (≥ 1) with a warning.
  • Add optional override setting/env (e.g., DISPATCHERD_MAX_WORKERS); enforce min_workers <= max_workers.
  • Unit tests for exception handling, bounds, and override precedence.
  • Document knobs in README.md and .env.example.

Touch points

  • src/backend/apps/dispatch/pool.py
  • src/backend/apps/dispatch/config.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions