Skip to content

ScaleScope 0.12.0

Choose a tag to compare

@jsawyerdev jsawyerdev released this 26 Sep 18:18
· 30 commits to main since this release
6a0f229

Added

  • Deploy to any cluster: kubectl apply -k k8s/scalescope installs the
    published multi-arch (amd64/arm64) ghcr.io/jsawyerdev/scalescope image;
    .github/workflows/image.yml publishes it and the sample workload image,
    and .github/workflows/ci.yml runs format, lint, type, test, shellcheck
    and script checks on every pull request.
  • Workloads without request metrics are forecast on their total CPU
    (metrics-server) and sized against their pods' CPU request, so every
    Deployment gets a recommendation with no Prometheus and no
    instrumentation. Responses report demand_signal.
  • Optional per-pod request rates from one Prometheus instant query per tick
    (SCALESCOPE_PROMETHEUS_URL, SCALESCOPE_PROMETHEUS_RPS_QUERY), attributed
    to Deployments through their label selectors.
  • Per-pod capacity is configured (SCALESCOPE_CAPACITY_PER_POD_RPS),
    estimated per workload from request-rate and CPU history, or the CPU
    request; responses report capacity_per_pod and capacity_source, and an
    unknown capacity holds replicas instead of guessing.
  • SCALESCOPE_MIN_REPLICAS, SCALESCOPE_MAX_REPLICAS,
    SCALESCOPE_TARGET_UTILIZATION, SCALESCOPE_RETENTION_HOURS, and
    SCALESCOPE_SCALE_DOWN_STABILIZATION_SECONDS (actuation, default 0).
  • The replay lab scores the p90 forecast that sizes replicas (pinball loss
    and coverage), ranks models by it, and backtests 10 anchors instead of 5.

Changed

  • Scaling is asymmetric: scale up for the p90 peak within the pod startup
    lead, scale down only when the whole horizon's p90 fits in fewer pods.
    Offline on DEMO demand this cut scale-direction reversals 5-7x for about
    2% more pods (see README "Scaling policy").

  • Recommendations and actuation plan from spec.replicas; status.replicas
    lags a scale write and made actuation repeat a step instead of taking the
    next one.

  • Collection lists Pods and PodMetrics once per namespace instead of three
    API calls per Deployment.

  • Observations are pruned after 24 hours by default; the forecast cache is
    a bounded LRU; store writes run off the event loop.

  • The default minimum replica count is 1 (was a fixed 3), and the simulator's
    220 req/s per pod is no longer used to size real workloads.

  • Manifests use the published images instead of a private registry.

  • Actuation RBAC grants only patch on deployments/scale; the unused
    update verb was removed.

  • The Docker builder stage no longer sets PYTHONOPTIMIZE, which made pip
    precompile only bytecode the runtime stage never loads; unused builder-only
    TZ/PYTHONHASHSEED settings and setuptools/wheel upgrades were
    removed.

  • Removed unreachable code paths: the 409 "no observations yet" responses
    (an unknown workload is exactly one with no observations, still 404),
    unsupported-mode branches, and a dead capacity guard.

  • Replay constants are shared between the API and scripts/tune, and
    diagnosis window/threshold literals are named constants.

  • scripts/rebuild.sh runs the configured mypy gate alongside formatting,
    lint, and tests.

  • scripts/rebuild.sh passes Basic Auth credentials to its smoke-test curls
    on stdin instead of the command line, keeping them out of ps.

Fixed

  • auto_ets no longer passes seasonal periods over 24 to StatsForecast's
    ETS, which silently skips every seasonal model above 24 after trying them:
    identical forecasts, about 100x faster (a full recommendation went from
    ~4.5s to ~0.5s).

  • HTTP Basic Auth no longer returns a 500 for non-ASCII usernames or
    passwords, and always compares both fields so response timing does not
    reveal whether the username alone was correct.

  • Observation timestamps are stored as UTC regardless of the host timezone;
    previously DuckDB converted them to local wall-clock time on non-UTC hosts,
    shifting the API's ts values and the dashboard's freshness indicator.

  • seasonal_naive now repeats the last cycle of the period detected in the
    workload's own history. It previously used a fixed 150-tick lag, half the
    simulator's 300-tick cycle, so it forecast the daily pattern inverted.

  • OBSERVE mode drops NaN/Inf Prometheus gauge values instead of storing
    them, which previously broke every recommendation for that workload.

  • OBSERVE mode parses every Kubernetes quantity suffix (k, P, E, Pi,
    Ei, ...) and reports malformed pod metrics as a per-target collection
    error instead of stopping the observe loop.

  • The diagnosis engine measures memory growth per tick (over the window's
    steps, not its row count), matching the MB/tick threshold it reports.

  • SCALESCOPE_TICK_SECONDS must be finite; nan/inf previously passed
    validation and stopped or stalled the data loop.

  • DEMO load triggers reject workloads the simulator does not drive, and
    OBSERVE triggers no longer let the workload's JSON reply overwrite
    ScaleScope's own workload/kind/duration_seconds/target fields.

  • The dashboard retries its initial workload load after a connection error
    instead of staying blank.

  • scripts/generate-observer-kubeconfig.sh creates the kubeconfig
    owner-only from the start instead of briefly exposing the token under the
    default umask.

  • The dashboard's actuation row is hidden outside actuation mode as its
    tooltip promises (component CSS was overriding the hidden attribute),
    and the chart uses the bundled DejaVu Sans Mono font like the rest of the
    page.

  • Baseline forecasts from a single observation get the same 1.0 minimum
    band as every other history instead of a zero-width one.