RESOURCE CATALOG

Autoscale

Adjusts Compute replica count based on a metric.

type: "autoscale"analogous to an auto scaling group

Definition

Scaling policy attached to a Compute. Keeps the average of the selected metric (CPU, memory, or requests per second) near the configured threshold, within the replica bounds declared on the target Compute.

When to use

  • Loads with predictable variation (business hours, seasonality).
  • Workers consuming queues with variable volume.
  • APIs with non-constant traffic.

When not to use

  • Constant loads — set replicas_min = replicas_max.
  • Very low volume sites — keep fixed replicas.

Configuration fields

Each field is validated at creation time. Defaults apply when fields are omitted.

config · autoscale
CampoTipoDefault · Opções
alvo_recurso_id
VM alvo
refcompute
metrica
Métrica
enum
cpumemoriarequests
Defaultcpu
limiar
Limiar (%)
int
Default75

Examples

Full payloads for POST to /api/projetos/{id}/recursos:

Scale on CPU at 70%

json
{
  "tipo": "autoscale",
  "nome": "auto-api",
  "config": {
    "alvo_recurso_id": "<id_api>",
    "metrica": "cpu",
    "limiar": 70
  }
}

Related resources

Autoscale · Catálogo · Tesserra Docs