Skip to main content

Virtual Care Service — Deployment Topology

Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · 03 platform-services

1. Runtime

PropertyValue
RuntimeNode.js 22 / NestJS 11
LanguageTypeScript 5.x
Package@ghasi/service-virtual-care
Container imageghasi/virtual-care-service:<tag>
Exposed port3031
Health checkGET /health (liveness + readiness)

2. Replicas and Scaling

EnvironmentAPI replicasScaling trigger
Development1
Staging2
Production3–8Concurrent 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.

ComponentNotes
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 UICustom 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

EnvironmentRegion
Production (Afghanistan)af-central-1 (MoPH sovereign)
Stagingaf-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