Skip to content
Veltoryx Technologies
ProLesson 14.1Intermediate19 min readUpdated 31 October 2026

Production Case Studies: Availability & API Gateway Outages (Incidents 01-10)

10 rigorous production incident postmortems covering service unavailability, gateway collapse, stale discovery, retry storms, and database lockouts.

Every great senior engineer or software architect is forged in the fires of production outages. When a multi-million-dollar distributed system fails, real engineering begins.

In this module, every incident is documented according to the 16-point production incident engineering standard used at tier-1 tech companies.

Production Incident Postmortem Lifecycle
Fig. 1 · Production Incident Postmortem Lifecycle

01Incident 01: The Leaf Service Collapse (Cascading Service Unavailability)

1. Title

Complete E-Commerce Checkout Outage Caused by Unindexed Recommendation Database Query.

2. Incident ID

INC-2026-001

3. Severity

P1 (Critical Outage) — 100% of consumer checkouts blocked for 42 minutes.

4. Affected Services

  • order-service
  • catalog-service
  • recommendation-service
  • api-gateway

5. Trigger

A scheduled promotional email blast directed 45,000 concurrent shoppers to product pages.

6. Symptoms

  • Ingress API Gateway returned HTTP 504 Gateway Timeout across all /orders/checkout endpoints.
  • CPU on catalog-service dropped to 4%, but all 200 Tomcat worker threads were completely blocked.

7. Detection Mechanism

PagerDuty alert triggered by Prometheus: rate(http_server_requests_seconds_count{status="504"}[1m]) > 5%.

8. Root Cause Analysis

catalog-service made a synchronous Feign HTTP call to recommendation-service to fetch related accessory products during checkout. A newly deployed marketing query in recommendation-service ran an unindexed LIKE '%gadget%' table scan against 14 million rows, taking 18 seconds per query. catalog-service had no Feign read timeout configured, causing all 200 worker threads to block waiting for recommendation responses. Once worker threads were exhausted, new checkout requests queued and timed out at the Gateway.

9. Blast Radius

Total loss of checkout revenue for 42 minutes; estimated loss: $420,000.

10. Short-term Mitigation

Engineers triggered an emergency configuration push to set feign.client.config.recommendation-service.readTimeout=500 and manually restarted catalog-service pods.

11. Long-term Architectural Fix

Decouple catalog-service from recommendation-service completely. Recommendation widgets must be loaded asynchronously by the front-end client or served via Redis cache with a hard circuit breaker fallback returning an empty list.

12. Architecture Flaw

Synchronous coupling of a non-critical feature (recommendations) directly into the core critical transaction path (order checkout).

13. Prevention Pattern

Circuit Breaker & Fallback Pattern (Resilience4j).

14. Complete Code or Configuration Example

java
@Service
public class CatalogService {

    private final RecommendationClient recommendationClient;

    @CircuitBreaker(name = "recommendationService", fallbackMethod = "emptyRecommendationsFallback")
    @TimeLimiter(name = "recommendationService")
    public CompletableFuture<List<ProductDto>> getRecommendations(String category) {
        return CompletableFuture.supplyAsync(() -> recommendationClient.fetchRecommendations(category));
    }

    public CompletableFuture<List<ProductDto>> emptyRecommendationsFallback(String category, Throwable t) {
        // Return empty recommendations gracefully without blocking checkout!
        return CompletableFuture.completedFuture(Collections.emptyList());
    }
}

15. Interview Follow-up Question

"If a non-critical downstream microservice starts timing out during peak traffic, how do you prevent it from exhausting your upstream worker threads?" Answer: Apply the Circuit Breaker and Bulkhead patterns with a short read timeout (e.g., 500ms). When downstream error/timeout rates cross 50%, the circuit breaker trips OPEN, immediately executing a fallback (such as returning cached data or an empty list) without blocking worker threads.

16. Lessons Learned

  • Never make non-critical service calls synchronously on the critical payment/checkout path.
  • Every HTTP client without an explicit read timeout is an unexploded bomb in production.

Loading the rest of the lesson…