Your weather app queries a database every 15 minutes to get the current temperature. The frontend is powered by Google App Engine and server millions of users. How should you design the frontend to respond to a database failure?
Show Answer & Explanation
Correct Answer: B. Retry the query with exponential backoff, up to a cap of 15 minutes.
Exponential backoff prevents thundering herd problems — millions of App Engine instances all retrying simultaneously would overwhelm a recovering database. Capping at 15 minutes aligns with the query frequency, so no extra staleness is introduced. Option A (restart DB) is not the frontend's responsibility. Option C (retry every second) creates massive load on a struggling DB. Option D (reduce to hourly) introduces unnecessary data staleness when the DB may recover quickly.