<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="504" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[504]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor> の <dfn><code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code></dfn> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は、
次に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>を送信するまでに待つべき時間を指定するものです。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="529" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[529]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>では実装されていませんが、特別な用途の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者エージェント</anchor>や
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Googlebot</anchor> は <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>後の再試行の時期の決定のために参照しているようです。</p><section><h1>仕様書</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[509]</anchor-end> <strong><cite xml:lang="en">RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</cite> (<time>2014-08-07 05:54:02 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7231#section-7.1.3">https://tools.ietf.org/html/rfc7231#section-7.1.3</anchor-external></strong></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="507" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[507]</anchor-end> <cite xml:lang="en">RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</cite> (<time>2014-08-07 05:54:02 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7231#section-6.5.11">https://tools.ietf.org/html/rfc7231#section-6.5.11</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="505" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[505]</anchor-end> <cite xml:lang="en">RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</cite> (<time>2014-08-07 05:54:02 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7231#section-6.6.4">https://tools.ietf.org/html/rfc7231#section-6.6.4</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <cite>OData Version 4.0 Part 1: Protocol Plus Errata 01</cite> (<time>2014-09-04 16:00:00 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc393958698">http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc393958698</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite xml:lang="en">RFC 6585 - Additional HTTP Status Codes</cite> (<time>2015-11-02 08:48:01 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc6585#section-4">http://tools.ietf.org/html/rfc6585#section-4</anchor-external></li></ul></refs></section><section><h1>意味</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="510" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[510]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者エージェント</anchor>が続きの<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>を行う前に待つ<rubyb xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">べき<rt xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">ought to</rt></rubyb>長さを示します。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;509</anchor-internal></src></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="512" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[512]</anchor-end> <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">3xx</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>では、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">リダイレクト</anchor>先の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>を発行する前に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者エージェント</anchor>が待つ<rubyb xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">べき<rt xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">ought to</rt></rubyb>最低時間を示します。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;509</anchor-internal></src></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>では、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">サービス</anchor>が利用不能であると思われる時間を示します。
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;509</anchor-internal></src></p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="516" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[516]</anchor-end> それ以外の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">状態符号</anchor>では意味は定義されていませんが、
なぜか特に禁止もされていません。</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">OData</anchor> では <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">202</anchor></code> でも <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Location:</anchor></code> と
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> を使うことを認めており、 <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code>
は <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Location:</anchor></code> の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> にアクセスする前に待つべき<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">時間</anchor>を表します
<src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;6</anchor-internal></src>。</p></section><section><h1>構文</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="506" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[506]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>の値は、
その時刻以降に再試行を開始するべき<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">絶対時刻</anchor>を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTPの日付形式</anchor>として指定するか、
または待つべき相対的な<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">時間</anchor>を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">デルタ秒</anchor>として<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">整数</anchor>で指定するかのいずれかです <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;509</anchor-internal></src>。</p><figure class="railroad"><ol><li>|<ol><li><code class="ABNF" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP-date</anchor></code></li><li><code class="ABNF" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">delay-seconds</anchor></code></li></ol></li></ol></figure></section><section><h1>文脈</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="415" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[415]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>は、 <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">413</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>において、
その状態が一時的なものである場合、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">クライアント</anchor>が再試行してもよい時刻を表す
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">生成</anchor>する<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">べきです</strong></anchor> <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="507" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;507</anchor-internal></src>。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="508" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[508]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>は、 <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>において、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>を再試行するまで<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">クライアント</anchor>が待つべき時間を提案する
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>を送っても<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">構いません</strong></anchor> <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="505" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;505</anchor-internal></src>。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <code><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">429</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>で <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>を使うことができます <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;11</anchor-internal></src>。</p></section><section><h1>3xx での用法</h1><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="512" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;512</anchor-internal></comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> 実際 redirect で2分とか待たされたら嫌かも。
その間 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">UA</anchor> は、利用者は、何をしてればいいんやねん?
みたいな。</p><p>応答で送られてきた<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">実体</anchor>を利用者に見せつつ、
何秒後に移動します。。。というメッセージを出すといいのかな。
非対話 UA だったら・・・どうするのだろう?</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> よく、移転しますた。っていうメッセージを <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">200</anchor></code> で出して、
<code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Refresh</anchor></code> で数秒後に飛ばすというのをやってますけど、
それの標準化された代替として使えるかな??</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="515" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[515]</anchor-end> 実装がこれに対応しているという話は聞いたことがありませんし、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>で使われているという話も聞いたことがありません。</p></section><section><h1>歴史</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="505" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[505]</anchor-end> RFC 1945 (HTTP/1.0) D.2.8; RFC 2068 (HTTP/1.1) 14.38; RFC 2616 (HTTP/1.1) 14.37 Retry-After</figcaption><blockquote><p>The Retry-After response-header field can be used with a 503 (<del><ins>{1945}</ins> service unavailable</del> <ins>Service Unavailable</ins>)
response to indicate how long the service is expected to
be unavailable to the requesting client. <ins><ins>{2616}</ins> This field MAY also be used with any 3xx (Redirection) response to indicate the minimum time the user-agent is asked wait before issuing the redirected request.</ins> The value of this field can
be either an HTTP-date or an integer number of seconds (in decimal)
after the time of the response.</p></blockquote><p><code class="HTTP">Retry-After</code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答頭欄</anchor>は、
どれだけの間サービスが利用不能と思われるかを要求してきたクライアントに示すために
<code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> (サービス利用不能) 応答と共に使うことができます。 <ins>この欄は、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">再指向</anchor>要求を発行する前に利用者エージェントに待機して欲しい最低時間を示すために <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">3xx</anchor></code> (再指向) 応答でも使って<strong>構いません</strong>。</ins>
この欄の値は、 <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP-date</anchor></code> か、応答の時刻の後の秒数 (十進整数)
のいずれかです。</p><insert xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><blockquote xmlns="http://www.w3.org/1999/xhtml"><p><ins>{2968,2616}</ins><ul><li>Retry-After  = &quot;Retry-After&quot; &quot;:&quot; ( HTTP-date | delta-seconds )</li></ul></p></blockquote><blockquote xmlns="http://www.w3.org/1999/xhtml"><p>Two examples of its use are<ul><li>Retry-After: Fri, 31 Dec 1999 23:59:59 GMT</li><li>Retry-After: 120</li></ul></p></blockquote><blockquote xmlns="http://www.w3.org/1999/xhtml"><p>In the latter example, the delay is 2 minutes.</p></blockquote><p xmlns="http://www.w3.org/1999/xhtml">後者の例では、間隔は2分です。</p></insert></figure></section><section><h1>実装</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="517" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[517]</anchor-end> <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ヘッダー</anchor>は
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>本体では実装されていません。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="523" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[523]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Bugzilla</anchor> には2004年から登録されています <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="522" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;522</anchor-internal></src> が、
10年経っても実装の見込みはありません。</p><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="522" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[522]</anchor-end> <cite xml:lang="en">230260 – Retry-After sent with HTTP 503 response is ignored</cite> (<time>2014-09-01 10:21:35 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugzilla.mozilla.org/show_bug.cgi?id=230260">https://bugzilla.mozilla.org/show_bug.cgi?id=230260</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="520" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[520]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Chrome</anchor> の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">captive portal</anchor> 検出機能では、 <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code>
からの再試行時に <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> の値を尊重するようです <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="518" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;518</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="519" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;519</anchor-internal></src>。 </p><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="518" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[518]</anchor-end> <cite xml:lang="en"><strong>[</strong>chrome<strong>]</strong> Revision 169246</cite> (<time>2014-09-01 10:18:56 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://src.chromium.org/viewvc/chrome?revision=169246&amp;view=revision">http://src.chromium.org/viewvc/chrome?revision=169246&amp;view=revision</anchor-external></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="519" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[519]</anchor-end> <cite>Issue 11419070: Added detection timeouts and usage of Retry-After HTTP header. - Code Review</cite> (<time>2014-09-01 10:19:01 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://chromiumcodereview.appspot.com/11419070">https://chromiumcodereview.appspot.com/11419070</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="524" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[524]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Mozilla Project</anchor> の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Android</anchor> 関連機能では <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> からの再試行時に
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> の値を尊重するようです <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="521" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;521</anchor-internal></src>。</p><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="521" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[521]</anchor-end> <cite xml:lang="en-US">mozilla-central: Search</cite> (<time>2014-09-01 10:19:57 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://hg.mozilla.org/mozilla-central/log?rev=Retry-After">https://hg.mozilla.org/mozilla-central/log?rev=Retry-After</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="526" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[526]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Android</anchor> で用いられる <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">GCM</anchor> では <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> で
<code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code> を尊重することが求められています <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="525" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;525</anchor-internal></src>。</p><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="525" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[525]</anchor-end> <cite>GCM HTTP Connection Server | Android Developers</cite> (<time>2014-09-01 10:23:05 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.android.com/google/gcm/http.html">https://developer.android.com/google/gcm/http.html</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="528" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[528]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Googlebot</anchor> は <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">503</anchor></code> 時の <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Retry-After:</anchor></code>
の値をスケジューリングの参考にしているようです <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="527" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;527</anchor-internal></src>。</p><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="527" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[527]</anchor-end> <cite xml:lang="en">Official Google Webmaster Central Blog: How to deal with planned site downtime</cite> (<time>2014-08-27 09:16:37 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://googlewebmastercentral.blogspot.jp/2011/01/how-to-deal-with-planned-site-downtime.html">http://googlewebmastercentral.blogspot.jp/2011/01/how-to-deal-with-planned-site-downtime.html</anchor-external></li></ul></refs></section><section><h1>例</h1><figure><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="513" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[513]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">絶対時刻</anchor>を指定した例 <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;509</anchor-internal></src></figcaption><pre class="HTTP code">Retry-After: Fri, 31 Dec 1999 23:59:59 GMT</pre></figure><figure><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="514" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[514]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">相対時刻</anchor>を指定した例 <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="509" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;509</anchor-internal></src></figcaption><pre class="HTTP code">Retry-After: 120</pre></figure></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">423</anchor></code> (固定済) あたりにも <code class="HTTP">Retry-After</code> が使えてもいい気がするのだけどどうよ?</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end>
<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal> Lock は他の処理との相互作用だから、予測がつかない、ってことかもしれませんけど、経験的に予想できることもありますから、使ってもいいかもしれませんね。</p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <cite>Help Desk API for Developers | Freshdesk</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">humans.txt</anchor> 著, <time>2015-08-29 17:23:28 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://freshdesk.com/api#ratelimit">http://freshdesk.com/api#ratelimit</anchor-external></figcaption><blockquote><p>The number of API calls per hour is restricted to 1000. If your API request is received after the limit has been reached, Freshdesk will give you an error response. The &quot;retry-after&quot; value in the response header will tell you how long you need to wait before you send another API request.</p><p>Response</p><p>HTTP STATUS: HTTP 403 Forbidden</p><p>Headers:</p><p>&quot;Retry-After&quot;: &lt;seconds&gt;</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite>Rate Limiting | Content API</cite>
(<time>2015-08-29 17:28:47 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://box-content.readme.io/reference#rate-limiting">https://box-content.readme.io/reference#rate-limiting</anchor-external></figcaption><blockquote><p>HTTP/1.1 429 Too Many Requests</p><p>Retry-After: {retry time in seconds}</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <cite>Rate Limiting - Riot Games API</cite>
(<time>2015-12-08 17:51:34 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.riotgames.com/docs/rate-limiting">https://developer.riotgames.com/docs/rate-limiting</anchor-external></figcaption><blockquote><p>If a call exceeds the user or service rate limit for a given period of time, then subsequent calls made to limited endpoints will return a 429 &quot;Rate limit exceeded&quot; HTTP response until the rate limit expires.</p><p>In addition to the response code, some additional headers will be included in the response that provide more information.</p><p>Retry-After - The remaining number of seconds before the rate limit resets.</p><p>X-Rate-Limit-Type - The rate limit type, either &quot;user&quot; or &quot;service&quot;.</p><p>If the above headers are not included in the response, then the rate limit was not enforced by the API infrastructure, but rather by the underlying service to which the request was proxied.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite xml:lang="en">RFC 7030 - Enrollment over Secure Transport</cite>
(<time>2016-06-19 16:27:56 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7030#section-4.2.3">https://tools.ietf.org/html/rfc7030#section-4.2.3</anchor-external></figcaption><blockquote><p>If the server responds with an HTTP <strong>[</strong>RFC2616<strong>]</strong> 202, this indicates</p><p>that the request has been accepted for processing but that a response</p><p>is not yet available.  The server MUST include a Retry-After header</p><p>as defined for HTTP 503 responses.  The server also MAY include</p><p>informative human-readable content.  The client MUST wait at least</p><p>the specified &quot;retry-after&quot; time before repeating the same request.</p><p>The client repeats the initial enrollment request after the</p><p>appropriate &quot;retry-after&quot; interval has expired.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <cite xml:lang="en">Backoff indicators — Kinto 8.1.5 documentation</cite>
(<time>2018-02-21 01:03:16 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://kinto.readthedocs.io/en/latest/api/1.x/backoff.html">https://kinto.readthedocs.io/en/latest/api/1.x/backoff.html</anchor-external></figcaption><blockquote><p>A Retry-After header will be added if response is an error (&gt;=500). See more details about error responses.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite xml:lang="ja">Firebase Cloud Messaging の HTTP プロトコル</cite>
(<time>2020-02-19 13:19:29 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://firebase.google.com/docs/cloud-messaging/http-server-ref?hl=ja">https://firebase.google.com/docs/cloud-messaging/http-server-ref?hl=ja</anchor-external></figcaption><blockquote><p>500~599 の範囲に含まれるエラー(500 や 503 など)は、リクエストの処理中に FCM 接続サーバーで内部エラーが発生したか、サーバーが(タイムアウトなどの理由で)一時的に利用できないことを示します。送信者はレスポンスに含まれている Retry-After ヘッダーを適用し、後で再試行する必要があります。アプリサーバーでは指数バックオフを実装する必要があります。</p></blockquote></figure></section></body></html>