Beginner LevelSystem Design & Architecture
What is Graceful Degradation and how do static fallbacks preserve core UX?
β Interview Prompt: Explain Graceful Degradation, fault isolation, static fallbacks, shedding non-essential features, and maintaining core user workflows.
Graceful Degradation is a resilience engineering principle ensuring that when non-essential subsystems fail or time out, the primary application remains operational:
Practical Implementation:
If an e-commerce Product Page's AI Recommendation Microservice fails:
β’
Brittle Failure: Entire product page crashes with HTTP 500.
β’
Graceful Degradation: Catch the recommendation API failure, log the error, and render the product page with a static cached list of "Top Selling Items" instead!
Code Implementation Example
typescript
export async function getProductRecommendations(userId: string) {
try {
return await recommendationClient.getForUser(userId);
} catch (error) {
// Graceful Degradation: Fallback to cached static default items!
logger.warn('Recommendation microservice offline; using fallback');
return await staticFallbackCache.getTopSellers();
}
}π‘Executing static fallback responses during downstream service outages.
π― Interview Key Takeaway
Design applications with Graceful Degradation to ensure core user workflows remain functional during secondary subsystem outages.
#System Design#Graceful Degradation#Fallbacks#Resilience#Beginner
Back to all System Design & Architecture Questionsβ