Skip to content

Architecture

Servet Arslan edited this page Jun 5, 2026 · 1 revision

Architecture

System Overview

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Client     │────→│  API (Rust) │────→│  PostgreSQL │
│  (SDK/HTTP)  │     │  Axum 0.8   │     │   (Neon)    │
└─────────────┘     └──────┬──────┘     └─────────────┘
                           │
                    ┌──────┴──────┐
                    │             │
              ┌─────▼─────┐ ┌────▼────┐
              │  Redis    │ │  Worker  │
              │ (Upstash) │ │  (Rust)  │
              └───────────┘ └────┬────┘
                                 │
                          ┌──────▼──────┐
                          │  Endpoint   │
                          │ (customer)  │
                          └─────────────┘

Components

API Server (Rust + Axum)

  • REST API with 144+ endpoints
  • JWT + OAuth + SSO/SAML authentication
  • Rate limiting (Redis-backed)
  • WAF, DDoS protection, bot detection
  • Cortex AI integration

Worker (Rust)

  • Background webhook delivery
  • Exponential backoff retries
  • Dead Letter Queue
  • Cortex healing integration

Database (Neon PostgreSQL)

  • All webhook data, endpoints, users, billing
  • TIMESTAMPTZ for all timestamps
  • Auto-scaling connection pool (min=2, max=50)

Cache (Upstash Redis)

  • Rate limiting counters
  • Session storage
  • DDoS protection
  • Real-time threat detection

Cortex AI Engine

  • Anomaly Scorer: EWMA + IQR adaptive thresholds
  • Healing Engine: Circuit breaker + Multi-Armed Bandit
  • Predictive Engine: Holt-Winters + Linear Regression
  • Drift Detection: Page-Hinkley + ADWIN + KS Test
  • Smart Routing: Failover + Round-robin
  • AutoML: Grid search parameter optimization

Security Stack (11 Layers)

  1. DDoS Protection (adaptive EWMA)
  2. Bot Detection (behavioral + UA)
  3. IP Blocklist (CIDR support)
  4. Rate Limiting (per-plan)
  5. WAF (SQL injection, XSS, SSRF, CMDi)
  6. Zero Trust (risk scoring)
  7. Brute Force Detection (Redis-backed)
  8. Credential Stuffing Detection
  9. Incident Response (auto-block)
  10. IP Reputation (AbuseIPDB ready)
  11. Auto-Resolution (rule + ML)

Clone this wiki locally