Skip to main content

Developer Portal Service — Deployment Topology

Version: 1.0 Status: Draft Owner: Product + Developer Relations (DevRel) Last Updated: 2026-04-20


1. Intent

Describe runtime, replicas, scaling triggers, regions, dependencies, and CDN posture for the Developer Portal. The portal mixes static (docs) and dynamic (Verify, key UI) workloads — both must be independently scalable.

2. Runtime Stack

  • Docs: Next.js 15 SSG/ISR on Node 22. TBD
  • Portal API: NestJS 11 on Node 22. TBD
  • Sandbox proxy: Fastify on Node 22. TBD
  • Verify worker: Node 22 background process. TBD

3. Replica Plan

ComponentMinMaxTrigger
Docs (Next.js)36CPU > 70% / 5m
Portal API312RPS > 200/inst
Sandbox proxy416RPS > 500/inst
Verify worker28NATS lag > 100

4. Regions

  • Primary: KBL-DC1 (Kabul). DR: KBL-DC2 + MZR-DC1 (Mazar). TBD

5. Dependencies (runtime)

  • auth-service (gRPC, mTLS) — hard dependency for key/Verify scopes. TBD
  • sms-orchestrator (HTTPS) — Verify SMS dispatch. TBD
  • channel-router-service (gRPC) — Verify channel fallback. TBD
  • analytics-service (gRPC) — consumption dashboards. TBD
  • billing-service (gRPC) — Verify spend metering. TBD

6. CDN

  • Cloudflare or in-country CDN equivalent fronting docs. TBD

7. Deployment Pipeline

  • TBD (GitHub Actions → ArgoCD → blue/green portal API; canary 10% Verify worker)

8. Resource Sizing

  • TBD

9. Secrets

  • Vault (per-env) for API keys to upstream services and HMAC pepper. TBD