La Fase 8 transforma AI-LAB de un runtime funcional con observabilidad clasica a un Cognitive Mesh en tiempo real: una malla cognitiva donde cada componente emite eventos, se visualiza en vivo y puede ser monitorizado con latencia sub-5s.

┌──────────────┐
│ Open WebUI │
│ :3000 │
└──────┬───────┘
│ /v1/chat/completions
┌──────────────────────────────────────────────────────┐
│ ROUTER API (:8083) │
│ capability-aware routing · stream sanitization │
│ CORS · model selection · session tracking │
└────────────────────┬─────────────────────────────────┘
┌──────────┼──────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Gateway │ │ Gateway │ │ Gateway │
│ :8008 │ │ :8008 │ │ :8008 │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ RX9070 │ │RX7900XT │ │ NAS │
│ LMStudio│ │LMStudio │ │(offline)│
└─────────┘ └─────────┘ └─────────┘
  • Hyper-V host (NAS-N5) con 2 VMs Ubuntu Server
  • 3 nodos GPU (RX9070 16GB, RX7900XT 20GB, NAS offline)
  • Red 10Gb + 2.5Gb con Cloudflare Tunnel
  • 7 servicios systemd con autoarranque
  • Gateway OpenAI-compatible con failover y rate limiting
  • Router API con routing capability-aware
  • Live API con eventos SSE y topologia
  • Prometheus: 192.168.1.40:9090
  • Grafana: 192.168.1.40:3000
  • Loki: 192.168.1.40:3100
  • Promtail: 192.168.1.30:1514/tcp para unifi-ids
  • Dashboards y logs ya conectados al stack vivo

Capa 4: Visualizacion en Tiempo Real (Fase 8)

Section titled “Capa 4: Visualizacion en Tiempo Real (Fase 8)”
  • SSE Event Bus: eventos estructurados via streaming
  • ClusterHealth: indicadores vivos GPUs/Docker/VRAM
  • EventStream: timeline de eventos cognitivos
  • TopologyGraph: topologia interactiva del cluster
  • Cytoscape.js: grafo de red para futura migracion
GPU Nodes (9182/9183)
│ scrape cada 30s
Prometheus (:9090 en 1.40)
├── Grafana dashboards (query)
└── live_api.py (:8084 en 1.30)
├── /api/status.json → Polling (ClusterHealth)
├── /api/topology → Polling (TopologyGraph)
└── /api/events → SSE push (EventStream)
MetricaFuenteLatencia
GPU temperaturaGPU API :91833s (SSE)
VRAM usadowindows_exporter :918230s (scrape)
Docker countlive_api.py3s (SSE)
Requests totalGateway :8008/metrics15s (scrape)
Eventos SSElive_api.py3s (push)
Topologialive_api.py5s (polling)
  • CORS configurado en Router API y Live API
  • Rate limiting en Gateway (30 req/min)
  • Cloudflare Zero Trust para acceso publico
  • Sin exponer puertos entrantes (solo Tunnel)