Skip to main content

Architecture

System Architecture

Null Autos is built on a multi-tier architecture designed for scalability, reliability, and performance.

High-Level Architecture

┌─────────────────────────────────────────────────────────┐
│ Client Layer │
│ Web Console │ API Clients │ CI/CD Tools │ SDK │
└────────────────────┬────────────────────────────────────┘

┌────────────────────▼────────────────────────────────────┐
│ API Gateway Layer │
│ Authentication │ Rate Limiting │ Load Balancing │
└────────────────────┬────────────────────────────────────┘

┌────────────────────▼────────────────────────────────────┐
│ Control Plane (Ctrl) │
│ Device Orchestration │ Scheduling │ Resource Mgmt │
└────────────────────┬────────────────────────────────────┘

┌────────────────────▼────────────────────────────────────┐
│ Compute Layer │
│ Virtual Device Clusters │ Emulator Instances │
└──────────────────────────────────────────────────────────┘

Components

API Gateway

  • RESTful API endpoints
  • WebSocket connections for real-time events
  • Authentication and authorization
  • Request validation and rate limiting
  • TLS termination

Control Plane (Ctrl)

The Ctrl platform is the brain of Null Autos, responsible for:

  • Device Lifecycle Management: Create, start, stop, delete virtual devices
  • Resource Scheduling: Intelligent placement of devices across compute nodes
  • Health Monitoring: Continuous health checks and auto-recovery
  • Metrics Collection: Performance and usage metrics
  • Event Streaming: Real-time events for device state changes

Compute Clusters

  • Kubernetes-based Orchestration: Containerized emulator instances
  • Hardware Acceleration: KVM with GPU passthrough support
  • Auto-scaling: Dynamic scaling based on demand
  • Resource Isolation: CPU, memory, and network isolation per device

Storage Layer

  • Block Storage: High-performance SSD for device storage
  • Object Storage: Long-term storage for logs, recordings, and artifacts
  • Database: Metadata and state management

Networking

  • VPC Isolation: Per-customer network isolation
  • Load Balancing: Traffic distribution across instances
  • CDN: Static asset delivery
  • VPN Support: Private connectivity options

Data Flow

Device Creation Flow

  1. Client submits device creation request via API
  2. API Gateway authenticates and validates request
  3. Ctrl schedules device on available compute node
  4. Compute node provisions emulator instance
  5. Device boots and registers with Ctrl
  6. Client receives device connection details

Device Interaction Flow

  1. Client connects to device via WebSocket or ADB
  2. Commands are routed through Ctrl
  3. Ctrl forwards to appropriate compute node
  4. Device executes command and returns response
  5. Response is streamed back to client

Scalability

Horizontal Scaling

  • Stateless API: API servers can scale horizontally
  • Distributed Ctrl: Multiple Ctrl instances with leader election
  • Compute Expansion: Add nodes on demand

Vertical Scaling

  • Resource Limits: Per-device CPU and memory limits
  • Overcommit Ratios: Intelligent resource overcommit
  • Burst Capacity: Temporary performance boosts

High Availability

Redundancy

  • Multi-AZ Deployment: Spread across availability zones
  • Database Replication: Multi-region database replication
  • Stateless Design: No single point of failure

Disaster Recovery

  • Automated Backups: Regular snapshots of critical data
  • Failover Mechanisms: Automatic failover on component failure
  • Data Replication: Cross-region data replication

Security Architecture

Network Security

  • Firewall Rules: Strict ingress/egress controls
  • DDoS Protection: Built-in DDoS mitigation
  • Encryption: TLS 1.3 for all traffic

Compute Security

  • Isolated VMs: Each device runs in isolated VM
  • Secure Boot: Verified boot process
  • Security Updates: Automated patching

Data Security

  • Encryption at Rest: All data encrypted on disk
  • Encryption in Transit: TLS for all network traffic
  • Key Management: Hardware security modules (HSM)

Monitoring & Observability

Metrics

  • System metrics (CPU, memory, network, disk)
  • Application metrics (API latency, error rates)
  • Business metrics (device count, utilization)

Logging

  • Centralized log aggregation
  • Structured logging format
  • Long-term log retention

Tracing

  • Distributed tracing for request flows
  • Performance profiling
  • Bottleneck identification

Next Steps