A server responds to a request with '503 Service Unavailable' and 'Retry-After: 120'. What should a well-behaved client do?
- A.Ignore the Retry-After value, retry immediately, then back off gradually if the retry also fails
- B.Disregard the strict Retry-After value, retry on a fixed five-second interval regardless of what it says, given that most 503 conditions clear faster than the header conservatively suggests
- C.Wait at least 120 seconds before retrying, then use exponential backoff with jitter if 503s continue, to avoid contributing to the overload
- D.Cache the 503 response for the full 120 seconds, serve that cached error to the user instead of retrying given that the server has already indicated it will not handle the request
Why C is correct
Retry-After with a 503 tells the client how long to wait before the service is expected to be available. A well-behaved client respects this value and avoids retrying sooner. If 503s continue after the Retry-After window, clients should implement exponential backoff with random jitter to prevent thundering-herd problems on recovery. Ignoring Retry-After amplifies server load during recovery.
Know someone studying for Web App Fundamentals? Send them this one.