20

Some hours my web site's server has too much load.
Which HTTP status code should I send to the Googlebot that visits my website?

Is "269 Call Back Later" this suitable for this case, or 503 Service Unavailable or do you have any more suggestions?

trante
  • 33,518
  • 47
  • 192
  • 272

2 Answers2

21

503 means the service is temporarily unavailable so it is appropriate to use while the server is overloaded. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

The Wikipedia article defines 269 as the initial response for a request that must be processed asynchronously. 269 means the request added something to the server's "queue" of things to do and the server will have a response available as soon as possible, whereas 503 means the server will not "remember" the request.

I've never heard of 269, though, and the first Google result for it is this question, followed by the Wikipedia article.

Jordan
  • 4,510
  • 7
  • 34
  • 42
  • 8
    It must be a joke in the standard. Client asks "to 69?" The server, having fulfilled the request, responds: "call back later!" Client thinks "yeah, sure, I'll call you." – Aleksandr Dubinsky Jun 23 '13 at 12:29
  • 1
    That 269 code has been removed from Wikipedia since then confirming it was not a real definition. – FGM Dec 06 '21 at 13:53
10

Another option is a 429 - Too Many Requests response.

Defined in RFC6585 - https://www.rfc-editor.org/rfc/rfc6585#section-4

The spec does not define how the origin server identifies the user, nor how it counts requests.

For example, an origin server that is limiting request rates can do so based upon counts of requests on a per-resource basis, across the entire server, or even among a set of servers.

Likewise, it might identify the user by its authentication credentials, or a stateful cookie.

Also see the Retry-After header in the response.

Community
  • 1
  • 1
Ben Walding
  • 4,006
  • 2
  • 30
  • 28
  • 2
    429 is appropriate when a *user* is making too many requests. If the server is overloaded because of more than one user, it should not be returned. 4xx codes are for when the user isn't playing by the rules. 5xx should mean it's something the user isn't responsible for. – McKay Oct 19 '21 at 21:38
  • That's not what the RFC says though: Note that this specification does not define how the origin server identifies the user, nor how it counts requests. For example, an origin server that is limiting request rates can do so based upon counts of requests on a per-resource basis, across the entire server, or even among a set of servers. – Ben Walding Nov 08 '21 at 04:19
  • 1
    But you're missing the bigger picture. "10.4 Client Error 4xx The 4xx class of status code is intended for cases in which the client seems to have erred." I mean sure you can do whatever you want, but the explicit "intent" is for 4xx errors is to be used for when the client has apparently made a mistake. What you're describing is against that intent. – McKay Nov 20 '21 at 04:14