Skip to main content

Provider Directory Service — Deployment Topology

Status: populated Owner: TBD Last updated: 2026-04-17

1. Runtime

AttributeValue
Lang / runtimeNode 22 / TypeScript 5.x
FrameworkNestJS 11
Containernode:22-alpine multi-stage
Ports8080 HTTP, 8081 metrics/health

2. Dependencies

DepRequiredPurpose
PostgreSQL 16Primary
OpenSearch 2.xSearch index
Redis 7Cache (privilege check, endpoint health)
NATS JetStreamEvents
identity-serviceJWKS
access-policyAuthorisation
terminology-serviceSpecialty validation
facility-serviceNode context
communication-serviceSoftExpiry notifications

3. Scaling

EnvReplicas
dev1
staging2
prod3–10 HPA

4. Regions

Per-tenant region alignment. AFG / UAE / EU stored in-region.

5. Environment

VarRequired
DATABASE_URL
REDIS_URL
NATS_URL
OPENSEARCH_URL
JWKS_URI
ACCESS_POLICY_URL
TERMINOLOGY_URL
FACILITY_URL
COMMUNICATION_URL
MODULE_KEY✓ (ehr.provider-directory)
OTEL_EXPORTER_OTLP_ENDPOINT

6. Probes

Liveness /healthz, readiness /readyz (db + opensearch + redis + nats + downstream ping), metrics :8081/metrics.

7. Deploy

Canary 5% / 30min; blue/green for migrations via expand-contract; feature flags for FHIR projection + expiry scanner.

8. Scheduled Jobs

JobCadence
Credential expiry scannerDaily 02:00 tenant-local
Endpoint healthcheckEvery 5 min
Search index incremental rebuildContinuous (event-driven)
Search index full rebuildWeekly