Vertical scaling (same server)

Increase calls per worker

Edit .env on the server:
MAX_CONCURRENT_CALLS=8
Then restart all workers:
systemctl restart 'voxcore@*'
Rule of thumb: 1 CPU core supports ~5 concurrent calls. Going higher risks audio quality degradation.

Add workers on the same server

  1. Create new systemd instances (they auto-provision via the template unit):
systemctl enable voxcore@5 voxcore@6
systemctl start voxcore@5 voxcore@6
  1. Add new ports to nginx upstream:
upstream voxcore_workers {
    least_conn;
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    server 127.0.0.1:8003;
    server 127.0.0.1:8004;
    server 127.0.0.1:8005;
    server 127.0.0.1:8006;
    keepalive 32;
}
  1. Reload nginx:
nginx -t && systemctl reload nginx
  1. Update VOXCORE_WORKERS in .env to match (used by health endpoint reporting).

Horizontal scaling (multiple servers)

Add a new server

1

Deploy VoxCore

Set up VoxCore on the new server with the same code, .env, and systemd units (ports 8001-8004).
2

Firewall

Restrict the new server’s VoxCore ports to only accept connections from the load balancer IP.
3

Update nginx upstream

Add the new server’s workers to the nginx upstream block on the load balancer:
upstream voxcore_workers {
    least_conn;
    # Server 1
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    server 127.0.0.1:8003;
    server 127.0.0.1:8004;
    # Server 2
    server 10.0.0.2:8001;
    server 10.0.0.2:8002;
    server 10.0.0.2:8003;
    server 10.0.0.2:8004;
    keepalive 32;
}
4

Reload nginx

nginx -t && systemctl reload nginx
5

Register in VoxBridge

Add the new server URL to VoxBridge system settings (voxcore_fleet) so outbound calls can be dispatched to it.

Zero-downtime restarts

Restart workers one at a time. While one worker restarts, the other three continue serving calls:
for i in 1 2 3 4; do
  systemctl restart voxcore@$i
  sleep 5
done
Active calls on the restarting worker will be dropped. Schedule restarts during low-traffic periods or use connection draining if available.