Sunday, November 22, 2026

From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)

From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)
Part 1 of 2 Java 21 & Spring AI MCP Jetson Orin Nano GPU

From Distributed Traces to GPU-Accelerated AIOps: Building a Self-Healing Microservice Architecture (Part 1)

Transparency Disclaimer & Source Repositories

Every single line of Java, SQL, YAML, Dockerfile, and frontend code referenced in this series was entirely generated by Google AI—I did not write a single line of code myself. My role was strictly that of the systems architect: designing the topology, wiring the containers across a hybrid hardware setup, testing edge cases, and diagnosing bottlenecks. Explore the complete source code on GitHub:

Modern microservice architectures give engineering teams remarkable agility, but they also turn everyday latency spikes into distributed puzzles. When a downstream third-party API slows down, log lines rarely tell the whole story—instead, delays cascade across virtual threads, database checkpoints, and user-facing Service Level Objectives (SLOs).

In this two-part series, we explore how to move from passive observability to governed, AI-driven incident response:

  • Part 1 (This Post): Instrumenting a hybrid neuro-symbolic Spring Boot service with OpenTelemetry and Jaeger, offloading local LLM and embedding inference to an NVIDIA Jetson Orin Nano GPU, and building an autonomous Model Context Protocol (MCP) guardian that detects SLO breaches and trips circuit breakers automatically.
  • Part 2 (Coming Next): Building a lightweight Security & AIOps Operations Center from scratch—integrating semantic runbook retrieval via a Milvus RAG store and a Human-on-the-Loop approval console so operators can inspect evidence, approve remediations, and persist structured root-cause memories.

1. The Hybrid Hardware & Container Architecture

Rather than running heavy LLM weights on CPU alongside Docker containers, this architecture splits workloads across two nodes on the local network:

  1. Primary Host Laptop (64 GB RAM — Docker Desktop): Runs the containerized Spring Boot 3.4+ / Java 21 microservices, Jaeger (OTLP collector and trace query API), PostgreSQL (stateful Human-in-the-Loop checkpoints), and Milvus + Attu (vector storage for semantic city-alias resolution and incident runbooks).
  2. Dedicated GPU Inference Node (NVIDIA Jetson Orin Nano — 8 GB Unified RAM): Runs Ollama (dustynv/ollama with CUDA 12.6) at 100% GPU offload, serving qwen2.5:3b (2.9 GB VRAM) for structured root-cause diagnosis and nomic-embed-text (768-dimensional vectors) for semantic retrieval.
Distributed Hybrid AIOps Infrastructure Diagram showing 64GB Windows Host Laptop and 8GB NVIDIA Jetson Orin Nano GPU Node
Figure 1: Distributed Hybrid AIOps Topology — Containerized Spring Boot MCP servers, Milvus, PostgreSQL, and Jaeger on a 64 GB host paired with 100% CUDA GPU inference on an 8 GB NVIDIA Jetson Orin Nano.

2. How the Telemetry & Remediation Loop Works

Step A: Hybrid Neuro-Symbolic Execution (geo-time-mcp-server, :8083)

The monitored application (geo-time-adaptive-agent) resolves U.S. city queries into verified local times and geographic coordinates. Instead of routing every request through a slow chat loop, it uses a deterministic fast-path in Java 21 virtual threads—falling back to Milvus semantic search (nomic-embed-text) for colloquial city aliases (like "The Big Apple") and PostgreSQL HITL checkpoints when city names are ambiguous (like "Springfield").

Every inbound request and downstream external HTTP call (nominatim.openstreetmap.org and timeapi.io) is instrumented with OpenTelemetry and exported over OTLP (:4318) directly to Jaeger (:16686).

Step B: Catching a Real SLO Breach in Jaeger

Our operational SLO defines any /api/geo-time/query trace exceeding 800 ms as degraded. Below is the Jaeger span breakdown captured during testing (1.02s total duration across 12 spans):

Figure 2: Real Jaeger trace waterfall (459eed2edf029bfc8a36ac609145caf1) showing a 1,024 ms request breaching the 800 ms SLO due to combined external geocoding and time-zone API latency.

Looking at the span breakdown immediately isolates why the request crossed our 800 ms threshold:

  • Local Milvus + Jetson Embedding Lookup (resolve-city-alias → milvus query → embedding): Completed in just ~40 ms.
  • Upstream Geocoding (lookup-location): Took ~468 ms.
  • Downstream Time-Zone API (get-time-zone): Stretched out another ~386 ms at the tail end of the waterfall, pushing total end-to-end latency to 1,024 ms.

Step C: Autonomous Diagnosis & Remediation (jaeger-aiops-guardian, :8084)

Instead of waiting for a human engineer to manually click through Jaeger waterfalls at 2:00 AM, jaeger-aiops-guardian exposes Jaeger's trace API and service admin endpoints as Spring AI MCP tools (inspectServiceTraces and executeServiceRemediation):

  1. Trace Inspection: AutonomousFleetObserver queries Jaeger for traces exceeding 800 ms on geo-time-mcp-server.
  2. GPU Root-Cause Diagnosis: The slow spans are serialized and sent over the LAN to qwen2.5:3b running at 100% GPU on the Jetson Orin Nano, which identifies timeapi as the root-cause component and selects OPEN_CIRCUIT_BREAKER.
  3. Standardized Remediation: jaeger-aiops-guardian invokes POST /api/admin/remediate on geo-time-mcp-server, immediately tripping the circuit breaker:
Executed OPEN_CIRCUIT_BREAKER on geo-time-mcp-server (timeapi): {"status":"APPLIED","component":"timeapi","circuitOpen":true}
Outcome: Self-Healing Latency Recovery & Graceful Degradation

The moment OPEN_CIRCUIT_BREAKER flipped circuitOpen to true on timeapi, geo-time-mcp-server stopped blocking virtual threads on slow external HTTP calls to timeapi.io and switched seamlessly to deterministic local IANA timezone resolution (java.time.ZoneId):

Before Remediation
1,024 ms (SLO Breach)
timeapi.io Span
386 ms → < 5 ms
Post-Remediation Status
HEALTHY (< 800 ms SLO)
  • Zero User Disruption: End users continued receiving accurate, verified local time cards with zero failed requests.
  • Cascading Failure Prevention: Short-circuiting the degraded external dependency eliminated tail-latency amplification across concurrent virtual threads.
  • Closed-Loop Verification: Subsequent health scans by jaeger-aiops-guardian confirmed traces dropped back well below the 800 ms SLO threshold.

3. What's Next in Part 2: Building a Lightweight Security & AIOps Operations Center

Coming Up in Part 2

Blindly auto-remediating every anomaly works for safe, reversible actions like tripping a circuit breaker on a flaky external API—but high-impact changes require policy gates, institutional runbook knowledge, and human sign-off.

In Part 2, we will build a lightweight Security & AIOps Operations Center (:8085) from scratch to replace heavy, complex enterprise scaffolding with a transparent, self-hosted governance engine:

  • Semantic Runbook & Incident Memory (milvus-memory-broker, :8080): Grounding LLM recommendations in PDF operational manuals and past post-mortems stored in Milvus.
  • Policy-Driven Human-on-the-Loop Console (:8085): Pausing high-risk actions so an operator can review Jaeger spans, Milvus runbook citations, and Jetson GPU reasoning before clicking Approve or Reject.

No comments:

Post a Comment