Virtual Care Service — Deployment Topology
Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · 03 platform-services
1. Runtime
| Property | Value |
|---|---|
| Runtime | Node.js 22 / NestJS 11 |
| Language | TypeScript 5.x |
| Package | @ghasi/service-virtual-care |
| Container image | ghasi/virtual-care-service:<tag> |
| Exposed port | 3031 |
| Health check | GET /health (liveness + readiness) |
2. Replicas and Scaling
| Environment | API replicas | Scaling trigger |
|---|---|---|
| Development | 1 | — |
| Staging | 2 | — |
| Production | 3–8 | Concurrent active sessions > 50 OR CPU > 70% |
No worker process; virtual-care-service is API + event handler only. Heavy compute (recording, STT) delegated to ai-gateway-service and Jibri.
3. Jitsi Meet Deployment (separate)
Jitsi Meet is a separately deployed stack — not bundled in the virtual-care-service container.
| Component | Notes |
|---|---|
| Jitsi Meet (Prosody + Jicofo + JVB) | Self-hosted; K8s or dedicated VM |
| Jibri (recording) | Optional; separate pod; requires shared NFS/object storage |
| Jigasi (PSTN dial-in) | Optional; separate pod |
| Branded UI | Custom React build deployed as static site |
The virtual-care-service communicates with Jitsi via REST API for room management and HMAC JWT for participant authentication.
4. Dependencies
5. Data Residency
| Environment | Region |
|---|---|
| Production (Afghanistan) | af-central-1 (MoPH sovereign) |
| Staging | af-staging |
Jitsi Meet media traffic (WebRTC) must not traverse non-Afghan routing for in-country deployments. Jitsi TURN server must be co-located.
6. Kubernetes Sketch
apiVersion: apps/v1
kind: Deployment
metadata:
name: virtual-care-service
spec:
replicas: 3
template:
spec:
containers:
- name: api
image: ghasi/virtual-care-service:latest
ports:
- containerPort: 3031
resources:
requests: { cpu: "200m", memory: "512Mi" }
limits: { cpu: "1000m", memory: "1Gi" }
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef: { name: vcare-db-secret, key: url }
- name: JITSI_SERVER_URL
valueFrom:
configMapKeyRef: { name: vcare-config, key: jitsi_url }
7. NATS Stream Bootstrap
nats stream add VIRTUAL_CARE \
--subjects "virtual_care.>" \
--storage file \
--replicas 3 \
--retention limits \
--max-age 7d \
--max-msg-size 65536