QA
Senior LevelSystem Design & Architecture

How do you design Graceful Degradation and Fallback strategies for mission-critical web applications?

❓ Interview Prompt: Explain Graceful Degradation, Fallback mechanisms, static fallback responses, shed load, and maintaining core functionality during outages.

Graceful Degradation ensures an application maintains essential core capabilities even when non-critical subsystems or microservices experience major outages:

Practical Implementation:

If the Recommendation Microservice fails on an e-commerce product page:

β€’
Brittle Failure: Entire product page returns HTTP 500 error!
β€’
Graceful Degradation: Catch Recommendation API timeout and render the page with a static fallback list of "Top Selling Items" instead!

Code Implementation Example

typescript
export async function getRecommendedProducts(userId: string) {
  try {
    return await recommendationClient.fetchForUser(userId);
  } catch (err) {
    // Graceful Degradation: Fallback to static top-rated products!
    logger.warn('Recommendation service down; using static fallback');
    return await staticFallbackCache.getTopProducts();
  }
}
πŸ’‘Executing static fallback responses during downstream service outages.
🎯 Interview Key Takeaway

Design applications with Graceful Degradation so failures in secondary services do not crash primary user workflows.

#System Design#Graceful Degradation#Resilience#Fallback#Senior
Back to all System Design & Architecture Questions→

More System Design & Architecture Interview Questions

Beginner LevelSystem Design & Architecture

Explain the CAP Theorem and PACELC Theorem with real-world database examples.

Beginner LevelSystem Design & Architecture

What is Vertical Scaling (Scale Up) vs Horizontal Scaling (Scale Out)?

Beginner LevelSystem Design & Architecture

How do Load Balancers distribute traffic (Round Robin, Least Connections, IP Hash)?