Bird
0
0

How can you combine graceful degradation with caching to improve REST API reliability?

hard📝 Application Q9 of 15
Rest API - Rate Limiting and Throttling
How can you combine graceful degradation with caching to improve REST API reliability?
AServe cached partial data when live data fetch fails, with 206 status
BAlways serve cached full data with 200 status, ignoring live failures
CDisable caching to avoid stale data during degradation
DReturn HTTP 500 errors when cache is empty
Step-by-Step Solution
Solution:
  1. Step 1: Understand caching role in graceful degradation

    Caching can provide fallback data when live fetch fails, improving reliability.
  2. Step 2: Combine caching with partial success signaling

    Serving cached partial data with 206 status informs clients of degraded but usable data.
  3. Final Answer:

    Serve cached partial data when live data fetch fails, with 206 status -> Option A
  4. Quick Check:

    Caching + 206 status = reliable graceful degradation [OK]
Quick Trick: Use cached partial data with 206 status on failures [OK]
Common Mistakes:
  • Serving cached full data hides failures
  • Disabling cache reduces availability
  • Returning 500 errors on empty cache breaks graceful degradation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes