Error Code - Retry-After header response from Google

287 views
Skip to first unread message

Code Smith

unread,
Nov 5, 2010, 10:31:09 AM11/5/10
to Costin Manolache, androi...@googlegroups.com

http://code.google.com/android/c2dm/index.html#testing

503
Indicates that the server is temporarily unavailable (i.e., because of timeouts, etc ). Sender must retry later, honoring any Retry-After header included in the response. Application servers must implement exponential back off. Senders that create problems risk being blacklisted.

What are the possible values for Retry-After header - does it say perform Exponential Back Off.

Are there any list of applicable domain values for this Retry-After Header response ?
 
Please let me know.
 
Thanks!

Gary

unread,
Nov 5, 2010, 11:01:40 AM11/5/10
to android-c2dm
Hi,
This is just my take on things, but Retry-After headers are only
supposed to specify either an HTTP-date or the number of seconds to
wait before trying again, so I simply parse to determine which one has
been sent. If I get a 503 and the Retry-After response-header has not
been provided, then I fall back to exponential backoff.

Thanks,
Gary

On Nov 5, 9:31 am, Code Smith <codesmith.hse...@gmail.com> wrote:
> http://code.google.com/android/c2dm/index.html#testing
>
>   503
>  Indicates that the server is temporarily unavailable (i.e., because of
> timeouts, etc ). Sender must retry later, honoring any* Retry-After* header

Costin Manolache

unread,
Nov 5, 2010, 12:57:50 PM11/5/10
to Code Smith, androi...@googlegroups.com
On Fri, Nov 5, 2010 at 7:31 AM, Code Smith <codesmit...@gmail.com> wrote:

http://code.google.com/android/c2dm/index.html#testing

503
Indicates that the server is temporarily unavailable (i.e., because of timeouts, etc ). Sender must retry later, honoring any Retry-After header included in the response. Application servers must implement exponential back off. Senders that create problems risk being blacklisted.

What are the possible values for Retry-After header - does it say perform Exponential Back Off.

The value is a number, in seconds. ( http also allows a HTTP-date, but we're using seconds ).


The 'exponential back off' is independent, and far more important:  if you get any error, even without Retry-After, you should wait few seconds before retry, than if it fails again double the wait before another try, etc. 
Sometimes servers and networks are overloaded or restarting or in a bad state - having the retry requests in addition to normal requests only makes it worse. 


Costin
Reply all
Reply to author
Forward
0 new messages