Q3Using APIs
A client uses a REST API to communicate with a server. Over HTTPS, it sends an HTTP request and receives an HTTP response containing the status code **503 Service Unavailable**. Which action is the appropriate response?
← → navigate · a answer
Community votes
Discussion · 15
11
correct answer is D
8
I think the answer should be D
503 could mean the server is down or unable to handle the request, it is a server-side issue, not a client-side one, other options are all trying to change something on the client side
5
Disagree, a server returning a 503 error code can also populate the "Retry-After" field, with an estimated time before the service is back online => https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
4
D
Explanation:
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code means that the server is not ready to handle the request.
Common causes are a server that is down for maintenance or that is overloaded. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, include the estimated time for the service to recover.
2
The answer is 'D'
2
Clear B.
From https://en.wikipedia.org/wiki/List_of_HTTP_status_codes:
503 Service Unavailable
The server cannot handle the request (because it is overloaded or down for maintenance). Generally, this is a temporary state.[66]
So there is nothing related to A,C,D. The only thing you can try is http instead of https, as it is another service.
D 2
Selected Answer: D
https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable
"
The 503 (Service Unavailable) status code means the server is currently unable to handle the request because of a temporary overload or scheduled maintenance, which will likely be fixed after some delay. The server MAY send a Retry-After header field (Section 10.2.3) to indicate an appropriate amount of time for the client to wait before retrying the request.
Note: The presence of the 503 status code does not mean that a server must use it when it becomes overloaded. Some servers might simply refuse the connection.
"
1
Moreover, "Retry-After" comes in a 429 message, not in a 503.
1
This is a right explanation! I go with D
1
D is my answer. See https://httpstatuses.com/503 , which says "The server MAY send a Retry-After header field to suggest an appropriate amount of time for the client to wait before retrying the request." This is referenced from rfc7231
D 1
Selected Answer: D
I would also go with D
D 1
Selected Answer: D
The correct answer is D.
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that along with this response, a user-friendly page explaining the problem should be sent. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, include the estimated time before the service recovers. The webmaster must also handle the caching-related headers that are sent with this response, since these temporary condition responses should usually not be cached.
D 1
Selected Answer: D
D is the correct one
1
Absolut D.
The Retry-After response HTTP header tells how long the user agent should wait before making a follow-up request. There are three main cases where this header is used:
When sent with a 503 (Service Unavailable) response, this tells how long the service is expected to stay unavailable.
When sent with a 429 (Too Many Requests) response, this tells how long to wait before making a new request.
When sent with a redirect response, such as 301 (Moved Permanently), this tells the minimum time the user agent is asked to wait before sending the redirected request.
D 1
Selected Answer: D
The correct answer is D. Check for a Retry-After header in the response and resend the request after the amount of time specified.
A 503 Service Unavailable error code means that the server is temporarily unavailable. This can happen for several reasons, such as the server being overloaded or under maintenance. The Retry-After header tells how long the client should wait before trying the request again.