How darshsoam07/failurelab works
FailureLab is an AI-assisted reliability-experiment platform. An SRE uses the dashboard to launch or stop an experiment; the controller injects a downstream fault, drives or monitors traffic, and enforces SLO guardrails. Orders travel through an outbox and broker to fulfillment and inventory, while telemetry and experiment state are persisted. After completion or abort, the AI worker analyzes the recorded timeline and stores a report for the dashboard. The README documents the principal service links; some internal controller and worker details are unsampled, so the graph avoids asserting unshown calls.
Main entry points: main.py Experiment controller · App.jsx React dashboard · worker.py Fulfillment worker · client.js API client
Components 29
Dashboard
- React dashboard
services/frontend/src/App.jsx - API client
services/frontend/src/api/client.js - Experiment launcher
services/frontend/src/components/ExperimentLauncher.jsx - Live telemetry
services/frontend/src/components/LiveTelemetryPanel.jsx - History and reports
services/frontend/src/components/ExperimentHistoryAndAIReport.jsx - Polling hook
services/frontend/src/hooks/usePolling.js - Topology view
services/frontend/src/components/TopologyBanner.jsx
Experiment control
- Experiment controller
services/experiment_controller/main.py - SLO watchdog
services/experiment_controller/watchdog.py - Traffic generator
services/experiment_controller/traffic_gen.py - Toxiproxy client
services/experiment_controller/toxiproxy_client.py
Order fulfillment
- Order API
services/order_api/main.py - Outbox relay
services/order_api/outbox_relay.py - Fulfillment worker
services/fulfillment_worker/worker.py - Retries and breaker
services/fulfillment_worker/resilience.py - Inventory service
services/inventory_service/main.py
AI analysis
- AI analysis worker
services/ai_worker/main.py - Report analyzer
services/ai_worker/analyzer.py - Analysis prompts
services/ai_worker/prompts.py
Shared data contracts
- Persistence models
services/common/models.py - API and event schemas
services/common/schemas.py - Database runtime
services/common/database.py - AMQP consumer supervisor
services/common/consumer.py - Shared configuration
services/common/config.py
Other components
- SRE
- Toxiproxy
- RabbitMQ
- LLM provider
- PostgreSQL
Connections 39
- SRE → React dashboard: uses
README.md - React dashboard → Experiment launcher: renders
services/frontend/src/App.jsx - React dashboard → Live telemetry: renders
services/frontend/src/App.jsx - React dashboard → History and reports: renders
services/frontend/src/App.jsx - React dashboard → Topology view: renders
services/frontend/src/App.jsx - Experiment launcher → API client: requests
services/frontend/src/components/ExperimentLauncher.jsx - History and reports → API client: requests
services/frontend/src/components/ExperimentHistoryAndAIReport.jsx - Live telemetry → API client: requests
services/frontend/src/components/LiveTelemetryPanel.jsx - React dashboard → Polling hook: polls with
services/frontend/src/App.jsx - API client → Experiment controller: controls experiments
services/frontend/src/api/client.js - API client → Order API: fetches metrics
services/frontend/src/api/client.js - Experiment controller → Traffic generator: configures traffic
services/experiment_controller/main.py - Experiment controller → SLO watchdog: monitors SLOs
README.md - Experiment controller → Toxiproxy client: manages faults
services/experiment_controller/main.py - Toxiproxy client → Toxiproxy: injects faults
services/experiment_controller/toxiproxy_client.py - Experiment controller → Order API: polls metrics
README.md - Experiment controller → PostgreSQL: stores experiment state
README.md - Experiment controller → RabbitMQ: publishes analysis event
README.md - Traffic generator → Order API: generates orders
README.md - Order API → PostgreSQL: writes order and outbox
services/order_api/main.py - Outbox relay → PostgreSQL: reads pending events
README.md - Outbox relay → RabbitMQ: publishes fulfillment
README.md - RabbitMQ → Fulfillment worker: delivers events
README.md - Fulfillment worker → Inventory service: reserves stock
README.md - Fulfillment worker → Toxiproxy: calls through proxy
README.md - Fulfillment worker → PostgreSQL: records outcome
README.md - Fulfillment worker → Retries and breaker: uses retry and breaker
services/fulfillment_worker/worker.py - Inventory service → PostgreSQL: records reservation
README.md - Inventory service → PostgreSQL: stores idempotency
README.md - RabbitMQ → AI analysis worker: delivers analysis event
README.md - AI analysis worker → PostgreSQL: reads timeline and saves report
README.md - AI analysis worker → Report analyzer: analyzes experiment
services/ai_worker/main.py - Report analyzer → Analysis prompts: uses prompts
services/ai_worker/analyzer.py - Report analyzer → LLM provider: requests analysis
- Database runtime → PostgreSQL: opens sessions
services/common/database.py - Database runtime → Shared configuration: loads settings
services/common/database.py - Persistence models → PostgreSQL: defines tables
README.md - API and event schemas → Persistence models: uses domain enums
services/common/schemas.py - AMQP consumer supervisor → RabbitMQ: supervises consumers
README.md