Skip to content

Repository files navigation

Titan : Distributed Real Time Network Observability Platform

Go Java Python TypeScript Rust

🚀 High-performance observability for large-scale distributed systems with ML-powered anomaly detection and 3D visualization

Features • Unique Features • Architecture • Quick Start • Shortcuts


🎯 Overview

Titan is a polyglot microservices platform designed to monitor large-scale infrastructure in real-time. It provides sub-second observability with ML-powered anomaly detection and stunning 3D visualization.

Metric Value
Total Files 152+
Services 6 microservices
Languages Go, Java, Python, TypeScript, Rust
Unique Features 16+

🖥️ Dashboard Preview

Titan Dashboard

3D Galaxy View showing 2,000+ infrastructure nodes with real-time metrics, alerts, and interactive controls

Dashboard Features Shown:

  • 3D Galaxy Visualization - Stunning network topology with interconnected nodes
  • Real-Time Metrics - Live throughput (2.0 GB/s), CPU utilization (47.8%), node health (81%)
  • Alert System - Active alerts counter with severity indicators
  • View Modes - Switch between Galaxy, Datacenter, and Globe views
  • Interactive Overlays - Packet flow, connections, and labels toggles
  • Control Panel - Node inspection, chaos engineering, and time travel controls

✨ Features

Core Platform

  • 🚀 High-Performance Ingestion - Go-based ingestor handling 10,000+ concurrent connections
  • 🧠 ML Anomaly Detection - Isolation Forest algorithm for unsupervised outlier detection
  • 🌐 3D Topology Visualization - GPU-accelerated network graph with 5,000+ nodes at 60 FPS
  • ⚡ Sub-Second Latency - End-to-end latency from event to visualization under 100ms
  • 🔒 Enterprise Security - OAuth2/JWT authentication with RBAC
  • 📊 Historical Analysis - Time-series storage with Cassandra for trend analysis

Unique Features

Interactive Features

Feature Description
🤖 AI Chat Assistant Natural language infrastructure queries: "Show high CPU servers"
⚡ Chaos Engineering Inject failures: CPU spike, DDoS, cascade failure, datacenter outage
⏰ Time Travel Mode Replay historical incidents with timeline scrubber and playback
🎨 Theme Customizer 5 stunning themes: Titan, Matrix, Cyberpunk, NASA, Midnight
🔊 Audio Alerts Severity-based spatial audio sounds
🌐 View Modes Switch between Galaxy, Datacenter, and Globe views
🌊 Packet Flow Animated network traffic particles
📋 Alert Rules Builder Visual drag-and-drop alerting rule editor

Polish Features

Feature Description
⌨️ Keyboard Shortcuts Press ? to view all shortcuts
📱 PWA Support Installable, works offline
📤 Export Dashboard Download data as JSON or CSV
🔗 Share Links Deep link to specific views
🧪 E2E Tests Comprehensive Playwright test suite
📖 OpenAPI Docs Full API specification
🔔 Slack/Discord Webhook alert integration
📊 Performance Profiling pprof endpoints for Go services

Keyboard Shortcuts

Key Action
? Show help
G Galaxy view
D Datacenter view
C Toggle Chaos panel
A Toggle AI Assistant
T Toggle Time Travel
P Toggle Packet Flow
Ctrl+E Export data
Ctrl+S Share link
Esc Close panels

Architecture

High-Level System Architecture

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                              TITAN ARCHITECTURE                                         │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                         │
│   ┌────────────────────────────────────────────────────────────────────────────────┐    │
│   │                              PRESENTATION LAYER                                │    │
│   │  ┌──────────────────────────────────────────────────────────────────────────┐  │    │
│   │  │      React 18 + Three.js + Tailwind CSS + Rust/WebAssembly               │  │    │
│   │  │     ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐      │  │    │
│   │  │     │ 3D Galaxy   │ │ AI Chat     │ │ Chaos       │ │ Time Travel │      │  │    │
│   │  │     │ Visualizer  │ │ Assistant   │ │ Engineering │ │ Mode        │      │  │    │
│   │  │     └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘      │  │    │
│   │  │     ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐      │  │    │
│   │  │     │ Theme       │ │ Alert Rules │ │ Node        │ │ Metrics     │      │  │    │
│   │  │     │ Customizer  │ │ Builder     │ │ Inspector   │ │ HUD         │      │  │    │
│   │  │     └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘      │  │    │
│   │  └──────────────────────────────────────────────────────────────────────────┘  │    │
│   └────────────────────────────────────┬───────────────────────────────────────────┘    │
│                                        │ WebSocket (Socket.io) + REST API               │
│   ┌────────────────────────────────────▼───────────────────────────────────────────┐    │
│   │                              API GATEWAY LAYER                                 │    │
│   │  ┌──────────────────────────────────────────────────────────────────────────┐  │    │
│   │  │                      Node.js + Express + Socket.io                       │  │    │
│   │  │  • Real-time WebSocket broadcasting    • REST API endpoints              │  │    │
│   │  │  • Connection management               • Prometheus metrics              │  │    │
│   │  │  • Rate limiting                       • Request routing                 │  │    │
│   │  └──────────────────────────────────────────────────────────────────────────┘  │    │
│   └────────────────────────────────────┬───────────────────────────────────────────┘    │
│                                        │                                                │
│   ┌────────────────────────────────────▼───────────────────────────────────────────┐    │
│   │                           MESSAGE BROKER LAYER                                 │    │
│   │  ┌──────────────────────────────────────────────────────────────────────────┐  │    │
│   │  │                         Apache Kafka + Zookeeper                         │  │    │
│   │  │     ┌──────────────────┐              ┌──────────────────┐               │  │    │
│   │  │     │   logs-raw       │──────────────│ alerts-processed │               │  │    │
│   │  │     │   (Raw Metrics)  │              │ (ML Alerts)      │               │  │    │
│   │  │     └──────────────────┘              └──────────────────┘               │  │    │
│   │  │  • Partitioned topics    • Consumer groups    • Exactly-once semantics   │  │    │
│   │  └──────────────────────────────────────────────────────────────────────────┘  │    │
│   └───────────────┬─────────────────────────────────────────┬──────────────────────┘    │
│                   │                                         │                           │
│   ┌───────────────▼─────────────────┐   ┌───────────────────▼───────────────────────┐   │
│   │       ML DETECTION LAYER        │   │           BUSINESS LOGIC LAYER            │   │
│   │  ┌───────────────────────────┐  │   │  ┌─────────────────────────────────────┐  │   │
│   │  │    Python ML Detector     │  │   │  │       Java 17 + Spring Boot 3       │  │   │
│   │  │                           │  │   │  │                                     │  │   │
│   │  │  • Isolation Forest       │  │   │  │  • RESTful APIs    • JWT Auth       │  │   │
│   │  │  • Z-Score Analysis       │  │   │  │  • RBAC            • Resilience4j   │  │   │
│   │  │  • Adaptive Thresholds    │  │   │  │  • Circuit Breaker • Rate Limiter   │  │   │
│   │  │  • Anomaly Scoring        │  │   │  │  • Retry Logic     • Bulkhead       │  │   │
│   │  └───────────────────────────┘  │   │  └─────────────────────────────────────┘  │   │
│   └─────────────────────────────────┘   └──────────────┬────────────────────────────┘   │
│                   ▲                                    │                                │
│   ┌───────────────┴─────────────────┐   ┌──────────────▼────────────────────────────┐   │
│   │       INGESTION LAYER           │   │            DATA STORAGE LAYER             │   │
│   │  ┌───────────────────────────┐  │   │  ┌─────────────────┐ ┌─────────────────┐  │   │
│   │  │      Go 1.21 Ingestor     │  │   │  │    Cassandra    │ │   PostgreSQL    │  │   │
│   │  │                           │  │   │  │                 │ │                 │  │   │
│   │  │  • gRPC Server (50051)    │  │   │  │  Time-series    │ │  User accounts  │  │   │
│   │  │  • TCP Server (50052)     │  │   │  │  metrics data   │ │  RBAC roles     │  │   │
│   │  │  • 10K+ connections/sec   │  │   │  │  Alert history  │ │  Audit logs     │  │   │
│   │  │  • pprof profiling        │  │   │  │  Node topology  │ │  Configurations │  │   │
│   │  │  • Prometheus metrics     │  │   │  │                 │ │                 │  │   │
│   │  └───────────────────────────┘  │   │  └─────────────────┘ └─────────────────┘  │   │
│   └─────────────────────────────────┘   └───────────────────────────────────────────┘   │
│                   ▲                                                                     │
│                   │ gRPC/TCP                                                            │
│   ┌───────────────┴─────────────────────────────────────────────────────────────────┐   │
│   │                           INFRASTRUCTURE NODES                                  │   │
│   │      ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐            │   │
│   │      │Node1│ │Node2│ │Node3│ │Node4│ │Node5│ │ ... │ │N4999│ │N5000│            │   │
│   │      └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘            │   │
│   │                    5,000+ Monitored Infrastructure Nodes                        │   │
│   └─────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────┘

Data Flow Architecture

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                              DATA FLOW PIPELINE                                     │
└─────────────────────────────────────────────────────────────────────────────────────┘

 ┌──────────────┐    gRPC/TCP     ┌──────────────┐    Kafka      ┌──────────────┐
 │  5000+ Nodes │ ──────────────► │ Go Ingestor  │ ────────────► │  logs-raw    │
 │  (Servers)   │   Metrics       │  (50051/52)  │   Producer    │   Topic      │
 └──────────────┘                 └──────────────┘               └──────┬───────┘
                                                                        │
                         ┌──────────────────────────────────────────────┼───────────┐
                         │                                              │           │
                         ▼                                              ▼           │
                 ┌──────────────┐                              ┌──────────────┐     │
                 │ Java Spring  │                              │ Python ML    │     │
                 │ Boot Service │                              │ Detector     │     │
                 └──────┬───────┘                              └──────┬───────┘     │
                        │                                             │             │
                        ▼                                             ▼             │
                 ┌──────────────┐                              ┌──────────────┐     │
                 │  Cassandra   │                              │ alerts-      │     │
                 │  PostgreSQL  │                              │ processed    │     │
                 │  (Storage)   │                              │   Topic      │     │
                 └──────────────┘                              └──────┬───────┘     │
                                                                      │             │
                         ┌────────────────────────────────────────────┘             │
                         ▼                                                          │
                 ┌──────────────┐    WebSocket    ┌──────────────┐                  │
                 │ API Gateway  │ ◄──────────────►│   Frontend   │                  │
                 │  (Node.js)   │   Real-time     │  (React 3D)  │                  │
                 └──────────────┘                 └──────────────┘                  │
                                                                                    │
└───────────────────────────────────────────────────────────────────────────────────┘

 Legend:
 ───────► Data Flow
 ◄──────► Bidirectional Communication

Microservices Detail

1. Go Ingestor Service (services/ingestor/)

┌─────────────────────────────────────────────────────────────────┐
│                        GO INGESTOR                              │
├─────────────────────────────────────────────────────────────────┤
│  Purpose: High-performance metric ingestion                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌─────────────────┐     ┌─────────────────┐                    │
│  │  gRPC Server    │     │   TCP Server    │                    │
│  │  Port: 50051    │     │   Port: 50052   │                    │
│  │  (Protocol Buf) │     │   (Raw Bytes)   │                    │
│  └────────┬────────┘     └────────┬────────┘                    │
│           │                       │                             │
│           └───────────┬───────────┘                             │
│                       ▼                                         │
│           ┌─────────────────────┐                               │
│           │  Connection Pool    │                               │
│           │  (10,000+ conns)    │                               │
│           └──────────┬──────────┘                               │
│                      ▼                                          │
│           ┌─────────────────────┐                               │
│           │   Kafka Producer    │ ──► logs-raw topic            │
│           └─────────────────────┘                               │
│                                                                 │
│  Endpoints:                                                     │
│  • /metrics      - Prometheus metrics                           │
│  • /debug/pprof  - Performance profiling                        │
│  • /health       - Health check                                 │
│                                                                 │
│  Performance:                                                   │
│  • 150K events/sec throughput                                   │
│  • 0.5KB memory per connection                                  │
│  • <5ms latency per event                                       │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

2. Java Business Service (services/business/)

┌─────────────────────────────────────────────────────────────────┐
│                    JAVA SPRING BOOT SERVICE                     │
├─────────────────────────────────────────────────────────────────┤
│  Purpose: Business logic, Auth, Data persistence                │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │                    REST Controllers                     │    │
│  │  /api/nodes     /api/alerts    /api/users   /api/rules  │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │                   Security Layer                        │    │
│  │  ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐    │    │
│  │  │ JWT Auth    │ │ RBAC        │ │ Spring Security │    │    │
│  │  │ (HS256)     │ │ (Roles)     │ │ (Filters)       │    │    │
│  │  └─────────────┘ └─────────────┘ └─────────────────┘    │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │                 Resilience Patterns                     │    │
│  │  ┌───────────────┐ ┌───────────────┐ ┌───────────────┐  │    │
│  │  │ Circuit       │ │ Rate          │ │ Retry         │  │    │
│  │  │ Breaker       │ │ Limiter       │ │ with Backoff  │  │    │
│  │  │ (Resilience4j)│ │ (100 req/s)   │ │ (3 attempts)  │  │    │
│  │  └───────────────┘ └───────────────┘ └───────────────┘  │    │
│  │  ┌───────────────┐ ┌───────────────┐                    │    │
│  │  │ Bulkhead      │ │ Time          │                    │    │
│  │  │ (Isolation)   │ │ Limiter       │                    │    │
│  │  └───────────────┘ └───────────────┘                    │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │                    Data Layer                           │    │
│  │  ┌─────────────────────┐  ┌─────────────────────┐       │    │
│  │  │   Cassandra         │  │    PostgreSQL       │       │    │
│  │  │   • Metrics         │  │    • Users          │       │    │
│  │  │   • Time-series     │  │    • Roles          │       │    │
│  │  │   • Alert history   │  │    • Audit logs     │       │    │
│  │  └─────────────────────┘  └─────────────────────┘       │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  Port: 8080                                                     │
│  Swagger: /swagger-ui.html                                      │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

3. Python ML Detector (services/ml-detector/)

┌─────────────────────────────────────────────────────────────────┐
│                    PYTHON ML DETECTOR                           │
├─────────────────────────────────────────────────────────────────┤
│  Purpose: Real-time anomaly detection using ML                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │               Kafka Consumer (logs-raw)                 │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │               Feature Extraction                        │    │
│  │  • CPU utilization    • Memory usage                    │    │
│  │  • Network I/O        • Disk I/O                        │    │
│  │  • Request latency    • Error rates                     │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │               ML Detection Pipeline                     │    │
│  │                                                         │    │
│  │  ┌─────────────────────────────────────────────────┐    │    │
│  │  │         Isolation Forest (Scikit-Learn)         │    │    │
│  │  │  • Unsupervised learning                        │    │    │
│  │  │  • Contamination: 0.01                          │    │    │
│  │  │  • n_estimators: 100                            │    │    │
│  │  └─────────────────────────────────────────────────┘    │    │
│  │                                                         │    │
│  │  ┌─────────────────────────────────────────────────┐    │    │
│  │  │           Z-Score Analysis                      │    │    │
│  │  │  • Statistical outlier detection                │    │    │
│  │  │  • Threshold: 3.0 standard deviations           │    │    │
│  │  │  • Rolling window: 1000 samples                 │    │    │
│  │  └─────────────────────────────────────────────────┘    │    │
│  │                                                         │    │
│  │  ┌─────────────────────────────────────────────────┐    │    │
│  │  │         Adaptive Thresholds                     │    │    │
│  │  │  • Dynamic baseline adjustment                  │    │    │
│  │  │  • Time-of-day patterns                         │    │    │
│  │  └─────────────────────────────────────────────────┘    │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │           Kafka Producer (alerts-processed)             │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  Port: 8081                                                     │
│  Libraries: scikit-learn, numpy, pandas, kafka-python           │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

4. Node.js API Gateway (services/api-gateway/)

┌─────────────────────────────────────────────────────────────────┐
│                    NODE.JS API GATEWAY                          │
├─────────────────────────────────────────────────────────────────┤
│  Purpose: WebSocket server, REST API, Real-time broadcasting    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │                    Express Server                       │    │
│  │  ┌─────────────────────┐  ┌─────────────────────┐       │    │
│  │  │  REST Endpoints     │  │  WebSocket Server   │       │    │
│  │  │  Port: 3000         │  │  Port: 3001         │       │    │
│  │  │                     │  │  (Socket.io)        │       │    │
│  │  │  GET  /api/nodes    │  │                     │       │    │
│  │  │  GET  /api/alerts   │  │  Events:            │       │    │
│  │  │  POST /api/chaos    │  │  • node:update      │       │    │
│  │  │  GET  /api/metrics  │  │  • alert:new        │       │    │
│  │  │                     │  │  • chaos:inject     │       │    │
│  │  └─────────────────────┘  └─────────────────────┘       │    │
│  └──────────────────────────┬──────────────────────────────┘    │
│                             │                                   │
│  ┌──────────────────────────▼──────────────────────────────┐    │
│  │                 Kafka Consumer                          │    │
│  │  ┌───────────────────────────────────────────────────┐  │    │
│  │  │  Subscribes to: alerts-processed                  │  │    │
│  │  │  Broadcasts alerts to all connected WebSocket     │  │    │
│  │  │  clients in real-time (<100ms latency)            │  │    │
│  │  └───────────────────────────────────────────────────┘  │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  Features:                                                      │
│  • Connection pooling for 1000+ concurrent clients              │
│  • Prometheus metrics at /metrics                               │
│  • Health check at /health                                      │
│  • CORS enabled                                                 │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Database Schemas

Cassandra (Time-Series Data)

-- Keyspace
CREATE KEYSPACE titan WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': 3
};

-- Metrics Table (Time-Series)
CREATE TABLE titan.metrics (
    node_id UUID,
    timestamp TIMESTAMP,
    cpu_percent DOUBLE,
    memory_percent DOUBLE,
    disk_io_read BIGINT,
    disk_io_write BIGINT,
    network_in BIGINT,
    network_out BIGINT,
    PRIMARY KEY ((node_id), timestamp)
) WITH CLUSTERING ORDER BY (timestamp DESC);

-- Alerts Table
CREATE TABLE titan.alerts (
    alert_id UUID,
    node_id UUID,
    timestamp TIMESTAMP,
    severity TEXT,        -- CRITICAL, WARNING, INFO
    alert_type TEXT,      -- CPU_SPIKE, MEMORY_LEAK, NETWORK_ANOMALY
    message TEXT,
    resolved BOOLEAN,
    PRIMARY KEY ((node_id), timestamp, alert_id)
);

-- Nodes Table
CREATE TABLE titan.nodes (
    node_id UUID PRIMARY KEY,
    hostname TEXT,
    ip_address TEXT,
    datacenter TEXT,
    status TEXT,          -- HEALTHY, WARNING, CRITICAL, OFFLINE
    last_seen TIMESTAMP,
    metadata MAP<TEXT, TEXT>
);

PostgreSQL (User Management)

-- Users Table
CREATE TABLE users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    email VARCHAR(255) UNIQUE NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    full_name VARCHAR(255),
    created_at TIMESTAMP DEFAULT NOW(),
    updated_at TIMESTAMP DEFAULT NOW()
);

-- Roles Table
CREATE TABLE roles (
    id SERIAL PRIMARY KEY,
    name VARCHAR(50) UNIQUE NOT NULL,  -- ADMIN, OPERATOR, VIEWER
    permissions JSONB
);

-- User Roles (Many-to-Many)
CREATE TABLE user_roles (
    user_id UUID REFERENCES users(id),
    role_id INTEGER REFERENCES roles(id),
    PRIMARY KEY (user_id, role_id)
);

-- Alert Rules Table
CREATE TABLE alert_rules (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name VARCHAR(255) NOT NULL,
    condition JSONB NOT NULL,
    severity VARCHAR(20),
    enabled BOOLEAN DEFAULT true,
    created_by UUID REFERENCES users(id),
    webhook_url TEXT,
    created_at TIMESTAMP DEFAULT NOW()
);

-- Audit Log
CREATE TABLE audit_logs (
    id SERIAL PRIMARY KEY,
    user_id UUID REFERENCES users(id),
    action VARCHAR(100),
    resource VARCHAR(255),
    details JSONB,
    ip_address INET,
    timestamp TIMESTAMP DEFAULT NOW()
);

Communication Patterns

┌─────────────────────────────────────────────────────────────────┐
│                    COMMUNICATION PROTOCOLS                      │
└─────────────────────────────────────────────────────────────────┘

  Service-to-Service Communication:
  ─────────────────────────────────

  ┌──────────────┐           ┌──────────────┐           ┌──────────────┐
  │   Ingestor   │──gRPC────►│    Kafka     │◄──Kafka──►│  ML Detector │
  │   (Go)       │           │              │           │  (Python)    │
  └──────────────┘           └──────────────┘           └──────────────┘
                                    │
                                    │ Kafka
                                    ▼
  ┌──────────────┐           ┌──────────────┐
  │   Business   │◄──REST───►│  API Gateway │
  │   (Java)     │           │  (Node.js)   │
  └──────────────┘           └──────────────┘
                                    │
                                    │ WebSocket
                                    ▼
                             ┌──────────────┐
                             │   Frontend   │
                             │   (React)    │
                             └──────────────┘

  Protocol Details:
  ─────────────────
  │ Protocol  │ Use Case                 │ Port  │
  ├───────────┼──────────────────────────┼───────┤
  │ gRPC      │ Ingestor ↔ Nodes         │ 50051 │
  │ TCP       │ Ingestor ↔ Legacy Nodes  │ 50052 │
  │ Kafka     │ Async event streaming    │ 9092  │
  │ REST/HTTP │ Sync API calls           │ 8080  │
  │ WebSocket │ Real-time UI updates     │ 3001  │
  │ CQL       │ Cassandra queries        │ 9042  │
  │ SQL       │ PostgreSQL queries       │ 5432  │

Resilience Patterns

┌─────────────────────────────────────────────────────────────────┐
│                    RESILIENCE PATTERNS (Resilience4j)           │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  CIRCUIT BREAKER                                            │
  │  ──────────────                                             │
  │  • Failure threshold: 50%                                   │
  │  • Wait duration: 30 seconds                                │
  │  • Ring buffer size: 10 calls                               │
  │                                                             │
  │    CLOSED ──────► OPEN ──────► HALF-OPEN ──────► CLOSED     │
  │      │            (wait)          │                │        │
  │      └────────────────────────────┴────────────────┘        │
  │           (failures)        (success)    (failure)          │
  └─────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  RATE LIMITER                                               │
  │  ────────────                                               │
  │  • Limit: 100 requests per second                           │
  │  • Timeout: 500ms                                           │
  │  • Algorithm: Token Bucket                                  │
  └─────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  RETRY                                                      │
  │  ─────                                                      │
  │  • Max attempts: 3                                          │
  │  • Wait duration: 1 second (exponential backoff)            │
  │  • Retry on: TimeoutException, IOException                  │
  └─────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  BULKHEAD                                                   │
  │  ────────                                                   │
  │  • Max concurrent calls: 25                                 │
  │  • Max wait duration: 500ms                                 │
  │  • Isolation: Thread pool per service                       │
  └─────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  TIME LIMITER                                               │
  │  ───────────                                                │
  │  • Timeout: 2 seconds                                       │
  │  • Cancel running future: true                              │
  └─────────────────────────────────────────────────────────────┘

Kubernetes Deployment Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                         KUBERNETES CLUSTER                                  │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                        INGRESS CONTROLLER                             │  │
│  │                    (NGINX / Traefik / Kong)                           │  │
│  │                     titan.example.com                                 │  │
│  └────────────────────────────────┬──────────────────────────────────────┘  │
│                                   │                                         │
│  ┌────────────────────────────────▼──────────────────────────────────────┐  │
│  │                         TITAN NAMESPACE                               │  │
│  │                                                                       │  │
│  │  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐  │  │
│  │  │   Frontend   │ │  API Gateway │ │   Business   │ │ ML Detector  │  │  │
│  │  │  Deployment  │ │  Deployment  │ │  Deployment  │ │  Deployment  │  │  │
│  │  │  replicas: 2 │ │  replicas: 3 │ │  replicas: 3 │ │  replicas: 2 │  │  │
│  │  └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘  │  │
│  │                                                                       │  │
│  │  ┌──────────────┐ ┌──────────────┐                                    │  │
│  │  │   Ingestor   │ │  Simulator   │                                    │  │
│  │  │  Deployment  │ │  Deployment  │                                    │  │
│  │  │  replicas: 3 │ │  replicas: 1 │                                    │  │
│  │  └──────────────┘ └──────────────┘                                    │  │
│  │                                                                       │  │
│  │  Services:        ConfigMaps:        Secrets:                         │  │
│  │  • frontend-svc   • app-config       • db-credentials                 │  │
│  │  • gateway-svc    • kafka-config     • jwt-secret                     │  │
│  │  • business-svc   • ml-config        • tls-certs                      │  │
│  │  • ingestor-svc                                                       │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                      INFRASTRUCTURE NAMESPACE                         │  │
│  │                                                                       │  │
│  │  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐  │  │
│  │  │    Kafka     │ │   Zookeeper  │ │  Cassandra   │ │  PostgreSQL  │  │  │
│  │  │ StatefulSet  │ │ StatefulSet  │ │ StatefulSet  │ │ StatefulSet  │  │  │
│  │  │  replicas: 3 │ │  replicas: 3 │ │  replicas: 3 │ │  replicas: 2 │  │  │
│  │  └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘  │  │
│  │                                                                       │  │
│  │  PersistentVolumeClaims:                                              │  │
│  │  • kafka-data-pvc (100Gi)                                             │  │
│  │  • cassandra-data-pvc (500Gi)                                         │  │
│  │  • postgres-data-pvc (50Gi)                                           │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                       MONITORING NAMESPACE                            │  │
│  │                                                                       │  │
│  │  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐                   │  │
│  │  │  Prometheus  │ │   Grafana    │ │  Jaeger      │                   │  │
│  │  │  Deployment  │ │  Deployment  │ │  Deployment  │                   │  │
│  │  └──────────────┘ └──────────────┘ └──────────────┘                   │  │
│  │                                                                       │  │
│  │  Dashboards:                                                          │  │
│  │  • Titan Overview    • Service Mesh    • Alert Manager                │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

  Helm Values:
  ────────────
  replicaCount:
    frontend: 2
    apiGateway: 3
    business: 3
    ingestor: 3
    mlDetector: 2

  resources:
    requests:
      cpu: 250m
      memory: 512Mi
    limits:
      cpu: 1000m
      memory: 2Gi

  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 10
    targetCPUUtilization: 70%

Frontend Component Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                        FRONTEND ARCHITECTURE                                │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                         App.tsx (Root)                                │  │
│  └────────────────────────────────┬──────────────────────────────────────┘  │
│                                   │                                         │
│  ┌────────────────────────────────┼──────────────────────────────────────┐  │
│  │                                │                                      │  │
│  │  ┌─────────────┐  ┌────────────▼───────────┐  ┌─────────────────────┐ │  │
│  │  │             │  │                        │  │                     │ │  │
│  │  │   Sidebar   │  │   Main Visualization   │  │    Control Panel    │ │  │
│  │  │             │  │   (Three.js Canvas)    │  │                     │ │  │
│  │  │ • Chaos     │  │                        │  │ • View Mode Switcher│ │  │
│  │  │ • Rules     │  │ ┌────────────────────┐ │  │ • Overlay Toggles   │ │  │
│  │  │ • Time      │  │ │  Galaxy/Datacenter │ │  │ • Node Inspector    │ │  │
│  │  │   Travel    │  │ │  /Globe View       │ │  │                     │ │  │
│  │  │             │  │ └────────────────────┘ │  └─────────────────────┘ │  │
│  │  └─────────────┘  └────────────────────────┘                          │  │
│  │                                                                       │  │
│  │  ┌─────────────────────────────────────────────────────────────────┐  │  │
│  │  │                         HUD (Heads-Up Display)                  │  │  │
│  │  │  ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐        │  │  │
│  │  │  │   Nodes   │ │Throughput │ │  Avg CPU  │ │  Alerts   │        │  │  │
│  │  │  │   2,000   │ │  2.0 GB/s │ │   47.3%   │ │    103    │        │  │  │
│  │  │  └───────────┘ └───────────┘ └───────────┘ └───────────┘        │  │  │
│  │  └─────────────────────────────────────────────────────────────────┘  │  │
│  │                                                                       │  │
│  │  ┌─────────────────────────────────────────────────────────────────┐  │  │
│  │  │                       Overlay Panels                            │  │  │
│  │  │                                                                 │  │  │
│  │  │  ┌────────────┐ ┌─────────────┐ ┌─────────────┐ ┌────────────┐  │  │  │
│  │  │  │ AI Chat    │ │ Chaos Panel │ │ Time Travel │ │ Theme      │  │  │  │
│  │  │  │ Assistant  │ │             │ │ Timeline    │ │ Customizer │  │  │  │
│  │  │  └────────────┘ └─────────────┘ └─────────────┘ └────────────┘  │  │  │
│  │  │                                                                 │  │  │
│  │  │  ┌────────────┐ ┌─────────────┐ ┌─────────────┐ ┌────────────┐  │  │  │
│  │  │  │ Alert      │ │ Export      │ │ Help Modal  │ │ Settings   │  │  │  │
│  │  │  │ Rules      │ │ Dialog      │ │ (Shortcuts) │ │ Panel      │  │  │  │
│  │  │  └────────────┘ └─────────────┘ └─────────────┘ └────────────┘  │  │  │
│  │  └─────────────────────────────────────────────────────────────────┘  │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
│  State Management (Zustand):                                                │
│  ───────────────────────────                                                │
│  ┌────────────────┐ ┌────────────────┐ ┌────────────────┐                   │
│  │  useNodeStore  │ │ useAlertStore  │ │ useUIStore     │                   │
│  │  • nodes[]     │ │ • alerts[]     │ │ • theme        │                   │
│  │  • selected    │ │ • rules[]      │ │ • viewMode     │                   │
│  │  • filters     │ │ • unreadCount  │ │ • panelStates  │                   │
│  └────────────────┘ └────────────────┘ └────────────────┘                   │
│                                                                             │
│  ┌────────────────┐ ┌────────────────┐ ┌────────────────┐                   │
│  │ useChaosStore  │ │useTimeTravelSt │ │ useAudioStore  │                   │
│  │ • scenarios    │ │ • timeline     │ │ • enabled      │                   │
│  │ • activeAttack │ │ • playbackPos  │ │ • volume       │                   │
│  └────────────────┘ └────────────────┘ └────────────────┘                   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Technology Stack

Component Technology Purpose
Ingestion Go 1.21 High-performance concurrent connections
Message Broker Apache Kafka Backpressure handling, data buffering
Business Logic Java 17/Spring Boot 3 CRUD, Auth, RBAC, Resilience4j
ML Detection Python 3.10/Scikit-Learn Isolation Forest, Z-score analysis
API Gateway Node.js 18/Express WebSocket server, REST API
Visualization React 18/Three.js 3D GPU-accelerated rendering
Optimization Rust/WebAssembly Binary parsing in browser
Time-Series DB Apache Cassandra 4.1 Metrics storage, alert history
Relational DB PostgreSQL 15 User management, RBAC
Infrastructure Kubernetes/Helm Production deployment
Monitoring Prometheus/Grafana Metrics and alerting

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Node.js 18+
  • (Optional) Go 1.21+, Java 17+, Python 3.10+, Rust

Run the Dashboard

# Clone the repository
git clone https://github.com/bhushanasati25/Titan-Distributed-Real-Time-Network-Observability-Platform.git
cd titan

# Start infrastructure
docker-compose -f docker-compose.dev.yml up -d

# Install frontend dependencies
cd frontend && npm install

# Start the dashboard
npm run dev

# Open http://localhost:5173
# Press ? to see all features!

Full Stack (Production)

# Build and start everything
docker-compose up --build

# Or deploy to Kubernetes
helm install titan ./infrastructure/kubernetes/helm/titan

📁 Project Structure

titan/
├── services/
│   ├── ingestor/           # Go - High-performance ingestion + pprof
│   ├── business/           # Java - Business logic + Resilience4j
│   ├── ml-detector/        # Python - Anomaly detection
│   ├── api-gateway/        # Node.js - WebSocket gateway
│   └── simulator/          # Go - Server fleet simulator
├── frontend/
│   ├── src/
│   │   ├── components/     # React components
│   │   │   ├── ai/         # AI Chat Assistant
│   │   │   ├── chaos/      # Chaos Engineering Panel
│   │   │   ├── timetravel/ # Time Travel Mode
│   │   │   ├── rules/      # Alert Rules Builder
│   │   │   └── three/      # 3D Visualization
│   │   ├── stores/         # Zustand state management
│   │   ├── hooks/          # Custom React hooks
│   │   └── lib/            # Utilities (audio, export, webhooks)
│   ├── wasm/               # Rust WebAssembly module
│   └── public/             # PWA manifest, service worker
├── infrastructure/
│   ├── kubernetes/helm/    # Helm charts
│   └── docker/             # Prometheus, Grafana configs
├── tests/
│   ├── e2e/                # Playwright E2E tests
│   └── load/               # K6 load tests
├── docs/
│   └── api/                # OpenAPI specification
└── .github/workflows/      # CI/CD pipelines

Testing

# Run E2E tests
npx playwright install
npx playwright test

# Run unit tests
cd services/ingestor && go test ./...
cd services/business && ./mvnw test
cd services/ml-detector && pytest
cd services/api-gateway && npm test

# Run load tests
k6 run tests/load/k6/load-test.js

Performance Metrics

Metric Target Achieved
Ingestion Throughput 100K events/sec ✅ 150K events/sec
End-to-End Latency <100ms ✅ 45ms (p99)
Visualization FPS 60 FPS ✅ 60 FPS (10K nodes)
Memory per Connection <1KB ✅ 0.5KB

API Documentation

Interactive API documentation available at:

  • OpenAPI Spec: docs/api/openapi.yaml
  • Swagger UI: http://localhost:8080/swagger-ui.html (when Java service is running)

Contributing

Contributions are welcome! Please read our Contributing Guide for details.


License

This project is licensed under the MIT License - see the LICENSE file for details.


Author

Developed by Bhushan Asati


Built with Go, Java, Python, TypeScript, and Rust

About

High-performance observability platform featuring 6 microservices (Go, Java, Python, Node.js, React, Rust WASM), real-time 3D galaxy visualization, ML-powered anomaly detection, and 16 unique features including AI chat, chaos engineering, and time travel mode.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages