Microservice Health Simulator
Real-time distributed system monitoring with failure simulation and WebSocket streaming. Python/FastAPI backend deployed on Render.com.
🔄 Microservice Health Simulator
Real-time distributed system monitoring
How to Use This Dashboard
- ⚡ Wake Up Server: Click this if the dashboard shows no data - it wakes up the free-tier server
- 🔄 Refresh: Manually update the data to see the latest metrics
- ▶️ Auto-Refresh: Toggle continuous updates every 3 seconds
- 💥 Simulate Failure: Click on individual services to trigger a 30-second failure and watch how it affects other services
- Status Colors: Green = Healthy, Yellow = Degraded, Red = Failing
⚠️ Server may be sleeping (Render.com free tier). Click "Wake Up Server" to start it (takes ~30-60 seconds).
{{ error }}
Total Requests
{{ metrics.total_requests }}
Total Errors
{{ metrics.total_errors }}
Avg Latency
{{ metrics.avg_latency_ms }}ms
Healthy Services
{{ metrics.healthy_services }}/{{ metrics.services_count }}
Loading services...
{{ service.service_id }}
{{ service.status.toUpperCase() }}
Latency
{{ service.latency_ms }}ms
Error Rate
{{ service.error_rate }}%
Success Rate
{{ service.success_rate }}%
Requests
{{ service.total_requests }}
Dependencies:
{{ dep }}
Overview
Simulates a network of 9 interconnected microservices with real-time health monitoring. Tracks latency, error rates, and service dependencies. Demonstrates failure propagation across dependent services with live WebSocket updates.
Key Features
- Concurrent Simulation: Async Python simulates 9 services with configurable dependencies
- Real-time Metrics: Latency, error rates, success rates, uptime per service
- Failure Propagation: Cascading failures across service dependencies
- WebSocket Streaming: Live metric updates to Vue.js dashboard
- Interactive Controls: Trigger failures on any service, watch propagation
- Dependency Graph: Visual service mesh with color-coded health status
Technical Implementation
Backend (Python)
- FastAPI for HTTP routing
- WebSockets for real-time streaming
- Asyncio for thread-safe concurrent metrics
- Async functions for parallel service simulation
- REST API: GET /services, GET /metrics, POST /simulate-failure
- Docker deployment for containerization
Frontend (Vue.js)
- Real-time service grid with health indicators
- Auto-refresh toggle for live monitoring
- Wake-up button for Render.com free tier
- Failure simulation controls per service
- Dependency visualization
Architecture
- 9 Simulated Services: api-gateway, auth-service, user-service, order-service, payment-service, inventory-service, notification-service, db-service, cache-service
- Dependency Graph: Services call dependencies with realistic latency and error rates
- Metrics Collection: Concurrent updates with proper locking
- Health Status: Green (healthy), Yellow (degraded >20% errors), Red (forced failure)