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.