sintoniadocs
Deployment and operations

Recording worker pools

Distributed workers, credentials and multi-server operations.

On this pageCapacity and trustStorage and failure behaviorCentral private HTTPS ingressDeploy each workerOperations and sizing

For recording without workers, see on-device recording. Both modes display persistent room notices.

Capacity and trust#

The instance can distribute recordings across several servers. In Administração → Gravações, set global concurrency; in Recording pools, create pools, set their limits and register one identity per worker process. Global concurrency defaults to 1, including upgrades. Flyway V13 adds pool/worker metadata without rewriting existing recordings or keys. New pools start disabled; recording remains opt-in.

Each process handles one recording at a time, including encoding/upload. Effective capacity is bounded by connected worker slots, pool limit, global limit and disk quota. One meeting has at most one active recording. A worker is connected after authenticated polling within 20 seconds. Automatic routing chooses the enabled pool with most free slots. An explicitly selected default pool never silently falls back if disabled/full/offline. There is no unbounded queue. Reservations are transactional. At most 100 pools are supported; workers are paginated in batches of 100.

Workers initiate outbound API and LiveKit connections and expose no ports. Each claim has an identity-bound lease and ephemeral public key. The moderator explicitly supplies the meeting media key sealed to that ephemeral key. The backend also seals only the archive key for that recording, bound to recording/lease/public key. The central RECORDING_STORAGE_KEY master stays on the backend, never on registered workers. An authorized worker can read media and that recording; operators remain within the recording trust boundary.

After capture/transcoding, the worker encrypts the MP4 as SREC and uploads ciphertext to the central private API. Identity, lease, size, SHA-256 and archive authentication are checked before publication. Identical uploads/completions are retryable; another worker cannot claim the lease. Playback still uses backend authorization and authenticated HTTP Range. No NFS or cross-host shared volume is required.

Storage and failure behavior#

  • Central: PostgreSQL metadata, final archives in private RustFS; meeting-recordings retains upload staging/legacy sources, and archive master. Back up all three consistently and retain the original key for restore.
  • Worker: private scratch holds plaintext capture/transcoding; outbox holds ciphertext awaiting central confirmation. Namespaces include both worker ID and process ID, even with shared roots. Use encrypted host storage and restricted access.
  • Confirmed outputs are removed locally. Uncertain completion preserves ciphertext for operator investigation; lost leases are not automatically replayed. Preserve volumes during upgrades.
  • Normal shutdown cleans its scratch. After a crash, drain and stop that worker before scripts/clean-scratch.sh worker.env --confirm-stopped. This command never touches outbox or central archives.

Final archives use private RustFS/S3 storage. Updated legacy workers also use API upload; workers receive no S3 credentials. Pools distribute processing; the backend remains a single instance. A crash/ephemeral-key loss fails the active attempt; there is no mid-recording migration. A failure between file movement and DB confirmation requires operator investigation; unknown archives are preserved rather than overwritten.

Central private HTTPS ingress#

Keep /api/internal/recordings/* blocked on the public proxy. Use the optional infra/compose.recording-control.yaml (also in infra/digitalocean/) over a private network/VPN with a valid TLS certificate. Continue validating TLS on the VPN.

  1. In the central Compose directory, create recording-control-tls/ containing operator-issued server.crt and server.key, with the private key accessible only to the operator/proxy. Never commit or export these files.
  2. Add to central operational configuration:
dotenv
COMPOSE_FILE=compose.yaml:compose.recording-control.yaml
COMPOSE_PROFILES=recording-control
RECORDING_API_HOST=recording-api.yourcompany.internal
RECORDING_API_BIND=10.0.0.10

For self-hosted Compose under infra/, use compose.selfhost.yaml first. The separator above is for Linux. Preserve any other enabled profiles. Default binding is loopback; explicitly choose a reachable private IP for remote workers.

  1. Restrict TCP 8443 to worker/VPN CIDRs. DigitalOcean Terraform variable recording_worker_cidrs defaults to an empty list: no ingress is opened. It rejects 0.0.0.0/0 and ::/0. Review/apply your restricted infrastructure change separately.
  2. Validate and update central Compose using the normal procedure. The installer copies the override/Caddy configuration, but certificates are provided separately and never replaced automatically. The ingress only serves recording-control/upload routes; individual worker authentication is still mandatory. Do not log Authorization or key/token responses. Never expose these routes through the public chat proxy or disable certificate validation.

Deploy each worker#

Requirements: Linux amd64, Docker Engine/Compose, registry login, working DNS/CA, outbound private HTTPS plus LiveKit signaling/media/TURN as configured. No database credentials, user identity or archive master are required.

  1. Copy infra/recording-workers/ (or recording-workers/ from the independent deployment repository). The regular release builds the same recorder image for linux/amd64; do not ship an arm64-only image to an amd64 Droplet.
  2. Create a pool and register each process in the portal. Confirm the administrator password and store the individual credential shown once. Registration does not provision servers or Docker.
  3. Copy worker.env.example to worker.env, run chmod 600 worker.env, then configure:
dotenv
RECORDING_WORKER_ID=ID_FROM_PORTAL
RECORDING_WORKER_TOKEN=INDIVIDUAL_CREDENTIAL
BACKEND_URL=https://recording-api.yourcompany.internal:8443
SINTONIA_RECORDER_IMAGE=registry.digitalocean.com/your-registry/recorder:YOUR_VERSION
RECORDING_LIVEKIT_URL=
WORKER_CPUS=2
WORKER_MEMORY=4g
NODE_EXTRA_CA_CERTS=

An empty LiveKit override uses the installation URL returned by the API. An override must be reachable from the worker/Chromium. For a private CA, copy only its public certificate to tls/ca.crt and set NODE_EXTRA_CA_CERTS=/tls/ca.crt; it is mounted read-only. Never copy the CA private key.

  1. On the worker server run:
bash
bash scripts/deploy.sh /private/path/worker.env

Validation does not source shell code and requires private 0600 configuration, HTTPS and a versioned registry image. Compose projects/volumes are named by worker ID. To run another process on the same host, use another identity and another private configuration. Do not use --scale with a shared credential. Keep credentials in a vault.

  1. Confirm connected status in the portal, enable the pool, select automatic/default-pool routing, then set/enable global policy. Test two synthetic meetings with separate explicit authorizations, participant indicators, audio, playback and seeking. No actual policy is enabled by the delivery.

Operations and sizing#

Drain worker blocks new jobs while allowing its active lease to complete. Disabling a pool cancels unassigned requests while assigned jobs finish. Wait for zero active jobs before stopping/upgrading. Credential rotation revokes the previous credential immediately and can interrupt jobs: drain first, save the new private configuration, then restart that process.

Starting estimate, not a load benchmark: 2 vCPU/4 GiB RAM per 720p worker, plus OS margin. Four workers suggest roughly 8 vCPU/16 GiB plus host overhead. Up to 16 prioritized cameras, one presentation and all audio are captured; higher resolutions/large meetings/shared CPU can require more.

Plan roughly 0.5–1.8 GB per recording-hour and validate with real media. Central admission reserves 1.8 GB/hour for maximum configured duration. Allow at least three times that reservation on a worker when scratch/outbox share a filesystem. Central backend disk still needs simultaneous temporary uploads; RustFS needs final-object capacity; logical quota does not replace free-space monitoring. Uploading 3.6 GB over 100 Mbit/s takes at least about five minutes and occupies the slot until completion. Include SFU receive traffic, upload, playback, IOPS and provider egress. Monitor disk, occupancy, last connection, failures and upload duration.

Upgrades do not start captures automatically. Consent, retention, audit and playback policy follow Meeting recording. Validate network and capacity in your own infrastructure before increasing concurrency.

The administration center provides overview, activity/files, local recording, server policy and pools/workers.

Search channels, QR codes, uploads, security…

↑ ↓ navigate ↵ open result