Skip to content

Deployment Architecture

Document ID: ARCH-008 Version: 1.0.1 Status: Draft — Day-1 target-state deployment vision, unrevised since project inception; superseded for GA by ADR-0010 (Path A, 2026-07-06): GA ships as a single-node appliance, not the multi-service HA topology described below. Corrected 2026-07-07: what’s real is deployment/docker-compose.yml (one wovyr binary + optional Postgres + Qdrant) and deployment/helm/wovyr/ (the same single-binary topology, replicas: 1 by product decision, offline-validated only, never applied to a live cluster). NATS JetStream and S3-compatible/MinIO object storage are not built at all (see ADR-0005’s current-status note and prd.md §25 for where the object-storage gap is now tracked — GA-002). mTLS between services is moot since there’s only one process; the real security floor is wovyr-server’s own auth/TLS layer (RM-GA-P1). The multi-replica/HA remainder of this document is the acknowledged, still-open gap tracked in GA-002 and Track B of phase3-scale-distribution-tickets.md (the v1.1 “Scale-Out” milestone). Owner: Architecture Team Last Updated: 2026-07-07


This document defines the deployment architecture of the Wovyr AI Platform.

It describes supported deployment models, infrastructure topology, networking, service discovery, scaling, high availability, disaster recovery, secrets management, and operational considerations.


The deployment architecture is designed to provide:

  • Cloud portability
  • High availability
  • Horizontal scalability
  • Secure operations
  • Operational simplicity
  • Infrastructure automation
  • Zero-downtime deployments

The platform follows a Deploy Anywhere model.

Supported environments:

  • Local development
  • CI/CD ephemeral environments
  • Team shared environments
  • Production Kubernetes clusters
  • Multi-region enterprise deployments

Infrastructure choices must not require changes to business logic.


Purpose:

  • Individual developer workstations

Components:

  • Single Rust executable
  • Angular development server
  • PostgreSQL
  • Redis
  • Qdrant
  • NATS JetStream
  • Local object storage (MinIO)

Characteristics:

  • Fast startup
  • Minimal operational overhead
  • Hot reload for UI and APIs

Purpose:

  • Shared integration and QA

Components:

  • Modular monolith
  • Managed PostgreSQL
  • Managed Redis
  • Shared Qdrant
  • Shared object storage

Characteristics:

  • Stable integration testing
  • Shared configuration
  • Centralized monitoring

Purpose:

  • Customer-facing workloads

Components:

  • API Gateway
  • Agent Runtime
  • Workflow Engine
  • Memory Engine
  • LLM Gateway
  • Dashboard Backend
  • Scheduler
  • Plugin Engine

Characteristics:

  • Independent scaling
  • Rolling updates
  • Health monitoring
  • Auto-recovery

Purpose:

  • Mission-critical deployments

Capabilities:

  • Multi-region clusters
  • Active-active or active-passive topology
  • Disaster recovery
  • Regional failover
  • Dedicated observability stack

Internet
External Load Balancer
Kubernetes Ingress
API Gateway Service
┌───────────────┼────────────────┐
▼ ▼ ▼
Agent Runtime Workflow Engine Platform Services
│ │ │
├───────────────┼────────────────┤
▼ ▼ ▼
Memory Engine LLM Gateway Tool Runtime
│ │ │
└───────────────┼────────────────┘
NATS JetStream
┌───────────────┼────────────────┐
▼ ▼ ▼
PostgreSQL Redis Qdrant
S3-Compatible Storage

Every deployable service is packaged as a minimal OCI-compatible container image.

Guidelines:

  • Multi-stage builds
  • Non-root user
  • Read-only root filesystem where possible
  • Health endpoints exposed
  • Immutable images

Recommended resources:

  • Deployments
  • StatefulSets (where required)
  • Services
  • Ingress
  • ConfigMaps
  • Secrets
  • PersistentVolumeClaims
  • HorizontalPodAutoscalers
  • NetworkPolicies

Namespaces should separate environments (e.g., dev, staging, prod).


Traffic Flow:

  1. Client → Ingress
  2. Ingress → API Gateway
  3. API Gateway → Internal services
  4. Internal services → Data stores / Event Bus

All service-to-service communication should use authenticated and encrypted channels (mTLS where supported).


Service discovery options:

  • Kubernetes DNS
  • Consul (optional)
  • Service mesh integration (optional)

Internal services communicate using stable service names rather than IP addresses.


Configuration sources:

  • Environment variables
  • ConfigMaps
  • Secrets
  • Runtime configuration service (future)

Configuration must be externalized and version-controlled where appropriate.


Secrets include:

  • API keys
  • Database credentials
  • LLM provider tokens
  • TLS certificates

Recommended options:

  • Kubernetes Secrets
  • HashiCorp Vault
  • Cloud-native secret managers

Secrets must never be embedded in container images or source code.


ComponentStorage
Relational DataPostgreSQL
CacheRedis
Vector IndexQdrant
Object StorageS3-compatible
Event StreamsNATS JetStream

Persistent volumes should be provisioned according to workload requirements.


Key strategies:

  • Multiple replicas for stateless services
  • Database replication
  • Redundant message brokers
  • Health probes
  • Automatic restart policies

Critical services should tolerate node failures without service interruption.


ComponentScaling Approach
API GatewayHorizontal
Agent RuntimeHorizontal
Workflow EngineHorizontal
Memory EngineRead-heavy horizontal scaling
LLM GatewayHorizontal
Dashboard BackendHorizontal
PostgreSQLPrimary/Replica
RedisCluster
QdrantDistributed
NATSClustered

Autoscaling should be based on CPU, memory, queue depth, and request latency.


Supported deployment methods:

  • Rolling updates
  • Blue/Green deployments
  • Canary releases

Rollback procedures must be automated and tested.


Objectives:

  • Backup relational data
  • Snapshot vector indexes
  • Replicate object storage
  • Preserve event streams where required

Define:

  • Recovery Point Objective (RPO)
  • Recovery Time Objective (RTO)

Regular disaster recovery drills should be part of operations.


Every deployment includes:

  • Prometheus metrics
  • OpenTelemetry traces
  • Structured logs
  • Grafana dashboards
  • Alerting

Health endpoints:

  • /health
  • /ready
  • /live

Deployment security includes:

  • TLS termination
  • Mutual TLS for internal traffic
  • Network policies
  • Role-Based Access Control (RBAC)
  • Image signing
  • Vulnerability scanning
  • Runtime security monitoring

Deployment pipeline stages:

  1. Build
  2. Unit Tests
  3. Static Analysis
  4. Security Scans
  5. Container Build
  6. Integration Tests
  7. Publish Images
  8. Deploy
  9. Smoke Tests
  10. Promote

EnvironmentPurposeScale
LocalDevelopmentSingle process
CIAutomated validationEphemeral
DevTeam integrationSmall
StagingPre-productionProduction-like
ProductionCustomer workloadsScalable
EnterpriseMulti-regionHighly available

  • Prefer immutable infrastructure.
  • Automate provisioning using Infrastructure as Code.
  • Monitor service-level objectives (SLOs).
  • Document runbooks for common operational tasks.
  • Test backup and restore procedures regularly.

  • System Overview
  • C4 Context
  • C4 Container
  • C4 Component
  • Clean Architecture
  • Event-Driven Architecture
  • DevOps Architecture
  • Disaster Recovery Plan
  • ADRs

VersionDateDescription
1.0.12026-07-07Added a header note: this doc’s multi-service HA/multi-region topology is superseded for GA by ADR-0010’s Path A decision; NATS and object storage were never built. Found during a project-wide doc review; no content changed
1.0.02026-06-26Initial Deployment Architecture document