Shape

Current production deployments are classic VPS deployments:
  • CXB Core fleet servers run multiple systemd worker instances.
  • nginx terminates public traffic and routes to Unix sockets.
  • CXB API runs as a FastAPI service.
  • CXB Console is built with Vite and served as static files.
  • CXB Dialler runs as a separate long-running process.
  • MongoDB, Redis, LiveKit, and object storage are external runtime dependencies.

Strengths

  • Cheap to run on small VPSs.
  • Easy to reason about host-by-host.
  • One call per worker is enforced at nginx and application level.
  • Zero code changes needed to add a fleet server; add URL in CXB API settings.
  • Failures are mostly isolated to a worker or host.

Weaknesses

  • Deployment uses rsync, systemd, and manual nginx edits.
  • Worker count changes require nginx config edits and service management.
  • Fleet capacity discovery is URL-list based.
  • Logs and metrics are distributed across servers.
  • Rollback is manual.
  • Large fleets become operationally heavy.

Non-negotiable production details

DetailWhy it matters
MAX_CONCURRENT_CALLS=1Preserves one-call-per-worker isolation.
nginx max_conns=1Prevents a busy worker from receiving another WebSocket/call start.
map $http_upgradeRequired so WebSockets and HTTP POST dialout both work. Hardcoded Connection "upgrade" breaks POST dialout.
CXBCORE_WORKERS matches actual workersHealth endpoint capacity is derived from this.
Shared object storage where possiblePlayback breaks when recordings live only on the originating fleet host.
Result and Agent Desk outboxes are persistentPrevents transient CXB API failures from losing results or handoffs.

Verification commands

For CXB Core:
curl -s https://fleet.example.com/health
curl -s https://fleet.example.com/health/fleet
For CXB Dialler:
curl -fsS http://127.0.0.1:8090/health
uv run python scripts/smoke_check.py
For local test runs:
cd ./core && uv run pytest -v
cd ./api && uv run pytest -v
cd ./console && npm run build
cd ./dialler && uv run pytest -v