Guides

Configure project scaling

Manual scale, autoscale, load balancing, per-surface topology, and vertical resource policy through Runtime Fabric.

Project scaling is authored as Runtime Fabric topology. You describe what each surface needs; Vadyl matches that intent against substrate capabilities, governance envelopes, quotas, and live PCG measures before any realization is applied.

Declare surface topology

{
  "surfaces": [{
    "surfaceKind": "CoreHandler",
    "scaling": {
      "mode": "Autoscale",
      "minInstances": 2,
      "maxInstances": 40,
      "partition": { "mode": "PerSurface" },
      "autoscale": {
        "strategy": "TargetTracking",
        "rules": [{
          "metric": "RequestsPerSecondPerInstance",
          "targetValue": 150
        }],
        "scaleOutCooldownSeconds": 60,
        "scaleInCooldownSeconds": 180
      }
    },
    "resources": {
      "resourceClass": "Standard",
      "cpuMillicores": 1000,
      "memoryMiB": 2048
    },
    "networkExposure": {
      "mode": "Public",
      "requireTls": true,
      "loadBalancing": { "mode": "ManagedPublic", "tier": "L7" }
    }
  }]
}

Preview the scaling policy before applying

vadyl runtime-fabric scaling preview --project billing --file runtime-topology.json
vadyl runtime-fabric scaling set-policy --project billing --surface CoreHandler --file core-autoscale.json
vadyl runtime-fabric scaling set-resources --project billing --surface CoreHandler --cpu 1000 --memory 2048
vadyl runtime-fabric scaling set-ingress --project billing --surface ApiIngress --load-balancing managed-public

The preview returns the same satisfaction report the apply path uses: required RuntimeSubstrate capabilities, resolved connector capabilities, governance ceilings, projected service count, and reason codes for any mismatch.

Autoscale from PCG measures

Built-in measures such as CPU, memory, request rate, latency, saturation, queue depth, and consumer lag come from substrate samplers or Runtime Fabric scale state. Custom PCG measures are accepted only when the Plane Capability Graph proves compatible semantic unit, dimensions, freshness, grants, and a live production sample source for the target.

Explain a decision

vadyl runtime-fabric autoscale explain --project billing --env production --surface EventConsumer

The explainer shows sampled values, target calculation, cooldown and hysteresis gates, rollout or drain suspension, governance limits, stale samples, and capability gaps. Operators debug scaling from the canonical decision record, not provider dashboards.

Capability gaps

If the selected substrate cannot realize what the project asks for, Vadyl fails closed. A HostManaged substrate that cannot horizontally scale cannot accept maxInstances: 10. A connector without load balancing cannot accept ManagedPublic. A substrate without GPU class support cannot accept an accelerator policy. Switch the policy, change the binding, or choose a substrate that advertises the capability.

The complete vocabulary is in Runtime Fabric vocabulary.