System Architecture
Gravity Labs — System Architecture
Simplified, scalable and cloud-agnostic · MVP First · Azure-native with multi-cloud portability. Diagram view: Nginx ingress, FastAPI services, RabbitMQ, PostgreSQL, Redis, VM labs, CI/CD, security, and monitoring blocks.
Request / Response
Async Flow
Management
Scroll horizontally for the full diagram. Pinch to zoom on touch screens.
USERS Participants / Learners Trainers / Evaluators Platform Admins Sponsors / Partners 1. ACCESS & EDGE LAYER Nginx Ingress Controller TLS termination · URL routing · Rate limits Health probes · AKS network policy DDoS Control TLS 1.2+ URL Routing AKS NetworkPolicy Rate Limiting (Nginx) Cert-Manager WAF Integration 2. APPLICATION LAYER — AKS FastAPI Microservices Core Business Services · auth-service ✓ Phase 1 · tenant-service · event-service · lab-service + Temporal · scoring / billing / catalog… AI Agents Layer 8 independent pods · KEDA · lab-architect-agent · dataset-forge-agent · provisioning-agent · qa-validator-agent · live-observer-agent Temporal Workers Durable workflow execution Provision · Grade · Destroy Guacamole Gateway RDP / SSH / VNC Access Browser-based · No client install AKS · Auto Scaling · Self Healing · Rolling Updates · Multi-Zone · KEDA 3. MESSAGING RabbitMQ Async inter-service events Lab Provisioning Queue Lab Cleanup Queue Notification Queue Score Queue Audit & Logs Queue Managed in AKS 4. COMPUTE LAYER VM Labs — Azure VMSS Windows / Linux Virtual Machines · Pre-built Lab Images (Packer) · Warm Pool Enabled — fast spin-up · Auto Scaling · Isolated Networks · Guacamole streaming (RDP / SSH) · GPU node pool for AI / ML labs · Terraform-managed lifecycle · Snapshot-based rapid restore · Spot VMs for non-prod cost saving Cluster Topology · Dev + Staging → Shared AKS cluster · Production → Dedicated AKS cluster · World Record → Multi-region Active / Active · Namespaces: gl-dev / gl-staging / gl-prod Client Layer React 18 · TypeScript · Tailwind CSS · Zustand · Axios · Vite · React Query · Served from AKS static pod · CDN-ready · PWA support · WCAG 2.1 AA accessible 6. SECURITY Key Vault Managed Identity NSG · Private Endpoints RBAC · JWT RS256 7. MONITORING Prometheus Grafana Dashboards Loki (Logs) CloudWatch (multi-cloud) Private Endpoints · Zero-Trust Network · mTLS between services 5. DATA & STORAGE LAYER PostgreSQL 16 Self-managed in AKS Single instance · per-service DBs · HA-ready Redis Cache · Sessions · Tokens JWT blocklist · Rate limits · SSO state Object Storage Cloud-managed per provider Azure: Blob · AWS: S3 · GCP: Cloud Storage 8. DEVOPS & CI/CD PIPELINE GitHub Code Repo GitHub Actions Build & Test ACR Container Registry Helm Charts Packaging Argo CD GitOps → AKS Monitor Rollback Multi-cloud portability · High scalability · Cost optimised · Security-first · MVP First — Gravity Labs by Constel Global · v1.0 · May 2026