Skip to content

Scaling and Load Balancing 🟑 BETA

Use this runbook to grow capacity on the supported single-host stack; the product ships resource controls, not an autoscaling controller.

The Admin guide path: install, secure, configure and operate the server.

When to use

  • A host is reaching CPU, memory, disk or connection limits and you need a measured change.
  • Do not use it to justify a Kubernetes deployment; that path is not supported (Kubernetes Deployment).

Before you start

Baseline Where to read it
Local ports and service roles Root AGENTS.md (API 8080, suite 3000, cloud 4000, login 5000).
Container inventory Container Deployment.
Runtime shape Architecture Overview.
Component versions botserver/3rdparty.toml.
Current metrics GET /metrics and the monitoring UI.

Capture the current numbers before changing anything. A threshold copied from prose is not a baseline.

Steps

  1. Raise instance limits for the component that is saturated, for example incus config set default-tables limits.cpu 2 or incus config set default-tables limits.memory 4GiB.
  2. Keep the cache and database on their own instances; do not co-locate them with the API process.
  3. Put Caddy in front of the front ends and let it route by hostname; the live hostnames and routing live in the Caddy config on the proxy container, not in this book.
  4. Add capacity only after measuring: more Incus instances for separate components, or a faster host for the API. There is no shipped controller that adds instances automatically.

Verify

Check Expected result
API health GET /health returns 200 after the change.
Metrics Latency and error counters return to the recorded baseline.
Container state incus list shows all components RUNNING with the new limits.
Port map Each surface still answers on its documented port; no service moved to an unlisted port.
Data integrity Host-mounted data directories are unchanged.

Roll back

  1. Restore the previous limits with incus config set <instance> limits.cpu / limits.memory.
  2. Remove any instance you added after confirming its data was not the only copy.
  3. Reload the Caddy configuration only after validating it; a reload with an invalid config takes the site down.
  4. Re-run the Verify table and record the new baseline.

Limits

Claim Status
Auto-scaling rules in config.csv Not asserted; no such controller is documented in the sources cited here.
Read replicas, sharding or a Redis cluster Not asserted as shipped behaviour.
CPU/memory/disk priority numbers Not asserted; measure and set per host.
Horizontal replica count No fixed target or percentage exists in this repository.