A server responds to a request with '503 Service Unavailable' and 'Retry-After: 120'. What should a well-behaved client do?
- A.Wait at least 120 seconds before retrying, then use exponential backoff with jitter if 503s continue, to avoid contributing to the overload
- B.Immediately retry the request to check if the outage has resolved
- C.Interpret this as a permanent error and stop sending requests forever
- D.Send a CONNECT request to bypass the service issue
Why A 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.