Skip to content

System Architecture

Zonrad is engineered for deterministic execution reliability, high-throughput agent orchestration, and sub-second real-time streaming.

Core Infrastructure Stack

CLIENT APPLICATION / SDK
│
HTTPS / SSE Stream
│
▼
┌───────────────────────────────────────────┐
│ Django 5.1 DRF (REST / ASGI) │
│ • Scoped API Key & JWT Authentication │
│ • Per-Workspace Token Bucket Limiting │
│ • StreamingHttpResponse (EventSource) │
└───────┬───────────────────────────┬───────┘
│ │
Redis Pub/Sub Celery Queue
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ Redis 7.2 │ │ Celery 5.4 │
│ • SSE Events │◄──────────┤ Worker Pool │
│ • Cache Layer │ │ • Standard Q │
│ • Rate Buckets│ │ • Extended Q │
└───────────────┘ └───────┬───────┘
│
▼
┌───────────────┐
│ MySQL 8.0 │
│ • Workspaces │
│ • Plans/Traces│
│ • Credit Log │
│ • Memory Revs │
└───────────────┘

Components

  • Django 5.1 DRF: Stateless REST API layer. Validates permissions, enforces HMAC signatures, routes requests, and streams events via StreamingHttpResponse.
  • Celery 5.4 Distributed Task Workers: Decoupled execution clusters partitioned into two profiles:
    • standard: Low-latency queue (concurrency 32, max run time 30s) for searches, memory lookups, and single-turn completions.
    • extended: Dedicated worker queue (concurrency 8, max run time 600s) for document synthesis, spreadsheet calculation, and slide compilation.
  • Redis 7.2: In-memory message broker, task queue, and SSE channel coordinator.
  • MySQL 8.0: ACID-compliant persistent relational storage with strict tenant indexing (workspace_id).

Latency SLAs & Streaming Benchmarks

Real-time streaming is built on native HTTP/2 SSE pipelines:

Metric Target SLA 99th Percentile
Handshake & Auth Validation < 45 ms 85 ms
run.started Event Emission < 120 ms 250 ms
Time to First Token (TTFT) < 280 ms 650 ms
Step Transition Overhead < 60 ms 140 ms
Heartbeat Ping Interval 15 seconds Fixed