Deployment Topology
:::info Source
Sourced from services/progress-service/DEPLOYMENT_TOPOLOGY.md in the documentation repo.
:::
1. Containers
| Container | Purpose |
|---|---|
progress-api | xAPI + internal REST |
progress-ingest | High-throughput statement ingest pipeline |
progress-projector | Attempt + completion projection from statements |
progress-outbox-relay | NATS publisher |
progress-partition-manager | pg_partman scheduled jobs (create + detach) |
2. Scaling
| Container | Min | Max | HPA |
|---|---|---|---|
progress-api | 5 | 50 | CPU > 60% or req-rate > 500 rps |
progress-ingest | 5 | 100 | queue depth > 1000 |
progress-projector | 3 | 20 | projection lag > 10s |
progress-outbox-relay | 3 | 8 | outbox backlog > 5000 |
3. Resources
| Container | CPU req/limit | Mem req/limit |
|---|---|---|
progress-api | 500m / 2000m | 512Mi / 2Gi |
progress-ingest | 1000m / 4000m | 1Gi / 4Gi |
progress-projector | 500m / 2000m | 512Mi / 2Gi |
4. Storage
- Postgres — primary + 2 replicas (read scale-out).
- Partitioning — monthly + tenant-hash.
- Cold archive — S3 Parquet after 180 days.
- WAL archive — continuous to S3 cross-region.
5. Caching
- Redis (per region) — xAPI query cache (tenant + filters hash, 60s TTL).
- pgbouncer transaction-mode pool.
6. CDN
- None (all endpoints authenticated, no public caching).
7. Edge Rules
- Rate limits at edge (per tenant + per user, §API_CONTRACTS §8).
- xAPI ingest from allowlisted 3rd-party LRSes require IP + API key.
8. Regional Deployment
- One cluster per residency region.
- Statements pinned to tenant homeRegion.
- Analytics firehose cross-region via Kafka MirrorMaker.
9. Service Mesh
- mTLS.
- Egress: analytics-service (firehose), certification-service (completion event), notification-service, enrollment-service.
10. Release Strategy
- Rolling for ingest/projector (stateless).
- Blue/green for API.
- Migrations applied pre-deploy; CI runs fwd+back.
11. DR
- RPO 5 min (WAL archive).
- RTO 90 min (restore + replay event log).
- Event log is source-of-truth; tables can be rebuilt.
12. Diagram
delivery/assessment ──▶ NATS ──▶ progress-ingest ──▶ Postgres (statements, attempts)
│
▼
progress-projector (derive attempt outcomes + completions)
│
▼
outbox → NATS ──▶ certification, assignment, analytics, notification
xAPI clients ──HTTPS──▶ progress-api ──▶ Postgres read replicas
└─▶ Redis (query cache)