checkout-service.yaml 1.5 KB

1234567891011121314151617181920212223242526272829
  1. service: checkout-service
  2. runbook_version: "1.2"
  3. procedures:
  4. - pattern: "DB pool exhausted"
  5. severity: P1
  6. steps:
  7. - "Identify slow queries: run SHOW PROCESSLIST on the primary DB; look for queries >5s"
  8. - "Run EXPLAIN on the slowest query to identify full table scans or missing indexes"
  9. - "Temporary mitigation: increase pool_size from 10 to 20 via config hot-reload"
  10. - "Permanent fix: add the missing index. Example: CREATE INDEX idx_orders_user_id ON orders(user_id)"
  11. - "Validate index creation: run EXPLAIN again to confirm index is used"
  12. - "Restart pods once index is verified: kubectl rollout restart deployment/checkout-service"
  13. - "Monitor db_pool_active_connections and http_request_duration_p99 to confirm recovery"
  14. - pattern: "high_p99_latency"
  15. severity: P1
  16. steps:
  17. - "Check downstream dependencies: DB query time, Redis cache hit rate, external API latency"
  18. - "Review request_queue_depth metric — if >100, consider pod autoscaling"
  19. - "Enable slow query logging if not active: SET GLOBAL slow_query_log = 'ON'"
  20. - "Consider circuit breaker activation to shed load and protect downstream services"
  21. - "Check recent deployments: git log --since='2 hours ago' on checkout-service"
  22. - pattern: "connection timeout"
  23. severity: P2
  24. steps:
  25. - "Check network connectivity between checkout-service pods and DB"
  26. - "Verify DB security group rules allow connections from checkout-service subnet"
  27. - "Check for DB maintenance windows or failover events in RDS console"