Story #41 Dependency Failure · Fault Isolation · Resilience

The Healthy Order API That Failed When Recommendations Went Offline

"The order database was healthy. The recommendation service was not. Orders stopped"

A retail order-detail API called the recommendation service synchronously before returning any data. When recommendations began timing out, essential order retrieval also returned 504 errors. Customer support and warehouse staff lost access even though no order data was affected.

What happened

A retailer’s order-detail API returned order information along with optional product recommendations. The order database and core order service were healthy, but the recommendation service was operated by a separate team and occasionally experienced slowdowns.

The API implementation called the recommendation service synchronously before returning any order data. When recommendations began timing out, the order-detail endpoint also returned 504 errors. Customer-support agents could not retrieve existing orders, and warehouse staff lost access to shipment details even though those operations did not require recommendation data.

The platform had configured a retry policy but no effective deadline propagation, circuit breaker, or bulkhead around the optional dependency. Retries increased pressure on the recommendation service and consumed application worker threads.

Root cause

A synchronous optional dependency was allowed to control the availability of a core API. Integration tests used healthy dependencies and did not test slow, unavailable, or partially responding services.

The fix

The team separated core order retrieval from optional enrichment. Recommendation failures now degrade the optional portion of the response, while core order data remains available. Timeouts, retry budgets, circuit breakers, and independent resource pools were added where appropriate.

Testing gaps and preventive tests

Dependency outage simulation, slow-response tests, circuit-breaker behavior, bounded retry checks, and verification that core operations remain available when optional dependencies fail. The test suite must distinguish essential from non-essential dependencies.

Business impact

A nonessential recommendation dependency interrupted essential order operations and increased support workload.

Lesson learned

Reliability includes deciding which dependencies are essential and containing failures when they are not.

The Healthy Order API That Failed When Recommendations Went Offline