Skip to content

Hardware & Scaling 🟑 BETA

Choose hardware from the pinned components, measure capacity against the recorded SLOs, and scale only when a measurement justifies it.

The admin operating loop

Overview

This chapter covers the machines that run General Bots and the limits that tell you when to add capacity. Component versions and checksums come from botserver/3rdparty.toml; the product version comes from the root Cargo.toml; performance budgets come from ops/slo.yaml.

Chapter Contents

Runbook Use when
Supported platforms Choosing a host or checking the installer's requirements
Buying guide Selecting a small board for an edge deployment
Desktop hardware Sizing a desktop for a local model
Local LLM Verifying the pinned llama.cpp release and model
Mobile Installing BotDevice on Android or HarmonyOS
Database optimization Investigating a slow query or a growing table
Sharding Splitting tenants across databases
SLOs Deciding whether a regression is a breach

Key Concepts

Tenant Isolation

Capacity changes must not weaken tenant scoping. A shared database still scopes every query by the verified owner.

Shard Architecture

A shard is a database with an explicit tenant-to-shard mapping. Read the mapping from its table, never from a client value.

Database Design Principles

table! and joinable! macros live only in the botschema crate. Change the schema with a migration, then regenerate the schema and update botschema.

When to Scale

Scale when a measured statistic breaches the budget in ops/slo.yaml or when a resource limit repeatedly refuses legitimate work. Do not scale on a single slow turn.

Quick Start

# Read the pinned components and the current performance budgets.
grep -A6 '\[components.tables\]' botserver/3rdparty.toml
grep -A6 '\[components.cache\]' botserver/3rdparty.toml
sed -n '1,80p' ops/slo.yaml

# Measure against a snapshot instead of guessing.
python3 scripts/check_slo.py --help

Verify

Check Command / surface Pass condition
Version botserver/3rdparty.toml component pin read from the manifest
Budget ops/slo.yaml objective named and measured
Gate scripts/check_slo.py a breached snapshot exits non-zero
Isolation tenant probe still refused across tenants

Roll back

πŸ”΄ Restore the prior resource limit or shard mapping from a snapshot and re-run the verification table. A capacity change that breaks tenant isolation is an incident under incident response.