How ouzdev/polly-resilience-playground works
Main Components
a. Client Layer:
• Guest API (Polly.Resilience.Playground.Guest.API)
• Resilience Strategies Implementation
• Service Layer with Strategy Service
b. External Service Layer:
• PMS API (Property Management System API)
• Endpoints for testing different failure scenarios
c. Monitoring & Observability Stack:
• Grafana for visualization
• Prometheus for metrics collection
• OpenTelemetry Collector
d. Testing Infrastructure:
• K6 Load Testing component
Component Relationships
• Guest API making resilient calls to the PMS API
• Metrics flow: Services → OpenTelemetry → Prometheus → Grafana
• Demonstrate how K6 generates load against the system
Specific Implementation Details
• Resilience Strategies (Retry, Circuit Breaker, Timeout, Bulkhead, Fallback)
• Service Abstractions (IStrategyService implementation)
• Common Components (ApiResponse, Result, ResilienceKeys)
┌─────────────────────────────────────────────────────────────┐
• Load Generation │
• (K6 Load Tests) │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Guest API │
• ┌─────────────────┐ ┌─────────────────┐ ┌────────────┐ │
• Controllers │ │ Strategy Service │ │ Resilience│ │
• Resilience │←→│ - Abstract │←→│ Patterns │ │
• Controller │ │ - Concrete │ │ (Polly) │ │
• ┘ └─────────────────┘ └────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• PMS API │
• ┌─────────────────┐ ┌─────────────────┐ │
• Controllers │ │ Services │ │
• ┘ └─────────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Monitoring Stack │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
• OpenTel │→│ Prometheus │→│ Grafana │ │
• Collector │ │ │ │ Dashboards │ │
• ┘ └─────────────┘ └─────────────────┘ │
• ┘
Additional Elements
• Network communication paths
• Resilience strategy configuration flows
• Metric collection paths
Important Notes
• Separation of concerns between Guest API and PMS API
• Monitoring points where metrics are collected
• Configuration sources and their relationships