Provider Directory Service — Deployment Topology
Status: populated
Owner: TBD
Last updated: 2026-04-17
1. Runtime
| Attribute | Value |
|---|
| Lang / runtime | Node 22 / TypeScript 5.x |
| Framework | NestJS 11 |
| Container | node:22-alpine multi-stage |
| Ports | 8080 HTTP, 8081 metrics/health |
2. Dependencies
| Dep | Required | Purpose |
|---|
| PostgreSQL 16 | ✓ | Primary |
| OpenSearch 2.x | ✓ | Search index |
| Redis 7 | ✓ | Cache (privilege check, endpoint health) |
| NATS JetStream | ✓ | Events |
| identity-service | ✓ | JWKS |
| access-policy | ✓ | Authorisation |
| terminology-service | ✓ | Specialty validation |
| facility-service | ✓ | Node context |
| communication-service | Soft | Expiry notifications |
3. Scaling
| Env | Replicas |
|---|
| dev | 1 |
| staging | 2 |
| prod | 3–10 HPA |
4. Regions
Per-tenant region alignment. AFG / UAE / EU stored in-region.
5. Environment
| Var | Required |
|---|
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
| Job | Cadence |
|---|
| Credential expiry scanner | Daily 02:00 tenant-local |
| Endpoint healthcheck | Every 5 min |
| Search index incremental rebuild | Continuous (event-driven) |
| Search index full rebuild | Weekly |