Skip to main content
Interactive 3D/ML Microservices Architecture
ML Service Mesh
Istio tracing enabled
API Gateway
rate limit, auth, routing
5ms
k8s svc
Feature Service
online feature lookup
12ms
k8s svc
Model Service v1
stable model (95% traffic)
45ms
k8s svc
Model Service v2
canary (5% traffic)
52ms
k8s svc
Post-processing
threshold, calibration
8ms
k8s svc
Logging Service
async prediction log
3ms
async
k8s svc
Request Trace
API Gateway 5ms
Feature Svc 12ms
Model Svc v1 45ms
Model Svc v2 52ms
Post-proc 8ms
Total: 122ms
Total Latency
122ms
Service Discovery
k8s DNS
Circuit Breaker
closed
Request Timeout
250ms
Failed Service
None
Fallback Active
No
Service Controls
Service Discovery
Inject Failure
Circuit Breaker
Request Timeout
Service Mesh
Circuit breakers prevent cascade failures.

Open = fast-fail immediately. Half-open = probe recovery. Closed = normal traffic.

ML Microservices Architecture - Interactive Visualization

A production ML microservices architecture separates concerns across specialized services: the API gateway handles rate limiting and routing; the feature service performs online feature lookup from Redis; the model service runs inference (often with two versions for canary deployments); post-processing applies thresholds and calibration; and the logging service asynchronously records predictions for monitoring and retraining. When a service fails, circuit breakers prevent cascade failures by fast-failing and returning fallback responses instead of waiting for timeouts. Service discovery (Kubernetes DNS or Consul) allows services to find each other without hardcoded addresses.

  • Circuit breaker states: closed (normal), open (fast-fail on failure), half-open (probe for recovery with one test request)
  • Canary deployment: route 5% of traffic to model-v2 while keeping 95% on stable model-v1 - observe metrics before full rollout
  • Async logging: prediction logs are written asynchronously so latency of the logging service does not block the main request path
  • Service mesh (Istio): provides distributed tracing, mTLS between services, and traffic management without code changes

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.