How It Works
Architecture overview of the DevZero platform -- from data collection to automated optimization.
How It Works
DevZero has two planes: an in-cluster plane (operators running inside your Kubernetes clusters) and a control plane (the DevZero platform that processes data and generates recommendations).
Data Flow
Read Operator
zxporter
Write Operator
dakr-op
Node Operator
node-controller
Scheduler
dz-scheduler
Collection
The Read Operator (zxporter) runs inside your cluster and collects resource utilization data -- CPU, memory, GPU, storage, and network metrics -- across all workloads. It uses Kubernetes informers and Prometheus scrapers to gather data without impacting performance.
Data is exported via gRPC to the DevZero control plane. No secrets, environment variables, or application data are ever collected.
Analysis
The Ingestion Pipeline receives metrics and stores them in time-series storage. The Recommendation Engine analyzes utilization patterns using percentile-based algorithms (p50, p95, p99) over configurable time windows to generate optimization recommendations.
Recommendations include:
- CPU/memory rightsizing -- adjust requests and limits to match actual usage
- Replica optimization -- scale replicas based on traffic patterns
- Node consolidation -- identify underutilized nodes for removal
- Instance type selection -- suggest cheaper or better-fit instance types
Policy Enforcement
The Policy Engine evaluates recommendations against your defined rules before anything is applied. Policies control:
- Which namespaces and workloads are eligible for optimization
- Maximum and minimum resource boundaries
- Whether changes can be auto-applied, or are audit-only
- Time windows for when changes are allowed
Application
The Write Operator (dakr-op) receives approved recommendations via a gRPC stream and applies them to your cluster. Changes are applied as Kubernetes-native operations -- patching deployments, updating HPA configs, or updating various CRDs.
For stateful workloads, DevZero supports live migration using CRIU-based checkpoint/restore, allowing resource changes without pod restarts.
Scheduling
The Scheduler (dz-scheduler) is a custom Kubernetes scheduler that optimizes where new pods land. It scores candidate nodes based on cost (querying the control plane for pricing), target resource utilization, and overprovision limits. It also ensures checkpoint-restored pods are placed only on capable nodes.
Security Model
- All communication uses mTLS encryption
- The Read Operator is read-only and open-source
- The Write Operator only modifies resources that match active policies
- Data is processed in isolated per-tenant environments
- DevZero is SOC 2 Type II certified