ScalixScalix Docs
Sign up

Scalix Run

Managed container services with autoscaling, revisions, and rollback

Overview

Scalix Run deploys long-running container services with automatic scaling, revision management, and instant rollback. Think of it as a simpler alternative to Kubernetes for stateless services.

Deploy a Service

bash
scalix-cloud run deploy --name api \
  --image registry.scalix.world/my-org/api:v2 \
  --port 8080 \
  --min-instances 2

Via the API:

bash
curl -X POST https://api.scalix.world/v1/services \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -d '{
    "name": "api",
    "container": {
      "image": "registry.scalix.world/my-org/api:v2",
      "port": 8080,
      "env": { "NODE_ENV": "production" }
    },
    "resources": {
      "memory_mb": 512,
      "vcpus": 1
    },
    "scaling": {
      "min_instances": 2,
      "max_instances": 20,
      "target_cpu_percent": 70
    }
  }'

Revisions

Every deployment creates a new revision. View service details:

bash
scalix-cloud run get <service-id>

Rollback

Instantly revert to the previous revision:

bash
scalix-cloud run rollback <service-id>

Via the API:

bash
curl -X POST https://api.scalix.world/v1/services/{id}/rollback \
  -H "Authorization: Bearer $SCALIX_API_KEY"

With no request body, the rollback reverts to the previous revision. To roll back to a specific revision, pass {"revision": N} (the CLI's --revision flag does this).

Scaling

Manual

bash
scalix-cloud run scale <service-id> --min-instances 3 --max-instances 10

Auto-scaling

Configure in the deployment:

json
{
  "scaling": {
    "min_instances": 1,
    "max_instances": 50,
    "target_cpu_percent": 70,
    "scale_down_delay_seconds": 300
  }
}

Monitoring

View live instance state:

bash
curl https://api.scalix.world/v1/services/{id}/metrics \
  -H "Authorization: Bearer $SCALIX_API_KEY"

Returns healthy/total instance counts and in-flight request totals.

Request-level RED metrics (requests/sec, 5xx/sec, p50/p99 latency) are charted on the service's Monitoring tab in the console, served by GET /v1/metering/services/run-service/{id}/metrics?range=1h|6h|24h|7d. The response carries available: false with an explanatory message on deployments without a metrics backend — an empty chart always means "no traffic", never "broken pipeline".

Logs

Live log streaming for Run services is not available yet — the API returns available: false until the log shipper lands, and the console's Logs tab says so rather than showing an empty stream. Function invocations and build logs are available today on their respective pages.