Skip to main content

Deployment Topology

:::info Source Sourced from services/content-service/DEPLOYMENT_TOPOLOGY.md in the documentation repo. :::

1. Containers

ContainerPurpose
content-apiREST API for packages, bundles, exports
content-builderPlayPackage build worker (long-running)
content-bundlerPer-device bundle encryption + signing worker
content-scorm-importerSCORM zip import worker (sandboxed)
content-exporterSCORM/HTML/xAPI export worker
content-outbox-relayNATS outbox publisher

2. Scaling

ContainerMinMaxHPA
content-api320CPU > 60%
content-builder230queue depth > 50
content-bundler350queue depth > 200 (bursty on enrollment spikes)
content-scorm-importer110queue depth > 5
content-exporter110queue depth > 20
content-outbox-relay25outbox backlog > 5000

3. Resources

ContainerCPU req/limitMem req/limit
content-api500m / 2000m512Mi / 1.5Gi
content-builder1000m / 4000m2Gi / 8Gi (asset processing)
content-bundler500m / 2000m1Gi / 2Gi (encryption-heavy)
content-scorm-importer1000m / 4000m2Gi / 4Gi (sandboxed)
content-exporter500m / 2000m1Gi / 4Gi

SCORM importer runs in gVisor / Kata sandbox for defense-in-depth.

4. Storage

TierPurposeRetention
S3 hotActive bundles + packages (recent 90 days)Standard class
S3 coldArchived packages (legal hold, audit)Glacier
PostgresMetadata only (no blobs)
Local ephemeralBuild workspacePer-job

5. CDN Usage

  • Bundle downloads served via signed CDN URLs.
  • HTML exports served via CDN (with CSP per tenant).
  • PlayPackage manifests cached 60s with revocation-aware invalidation.

6. KMS

  • Per-tenant signing key (HSM-backed).
  • Per-region replication for DR.
  • kid rotation annual; emergency rotation tested quarterly.

7. Regional Deployment

  • Deployed per region (us, eu, me, ap).
  • Bundles for a tenant served from tenant's homeRegion.
  • Tamper / revocation events replicated globally via NATS cross-region.

8. Service Mesh

  • mTLS.
  • Egress to media-service, catalog-service, authoring-service, sync-service, ai-gateway (for AI assistant config generation).
  • Egress to S3/R2 via VPC endpoint.

9. Release Strategy

  • Canary: 10% → 50% → 100%.
  • Builders + importers: rolling; jobs idempotent.
  • CDN invalidation on manifest shape change.

10. Diagram

authoring-service ─ authoring.course_draft.published.v1 ─▶ NATS

content-outbox-relay ◀─── content-api ◀─── HTTPS │
▲ ▼
│ content-builder ◀────┤
│ │ │
▼ ▼ │
Postgres S3 (pkgs) │

enrollment.created.v1 ──────────────────────────────────────┤

content-bundler


S3 (bundles) + KMS

content.play_package.bundle.published.v1


sync-service

11. DR

  • RPO 15 min (event log + S3 versioning).
  • RTO 90 min for full rebuild from event log.
  • Packages + bundles can be rebuilt from source drafts + event log; KMS keys are authoritative.