Redirect and retry

Split transport failures from HTTP responses at the attempt outcome

Redirect and retry Split transport failures from HTTP responses at the attempt outcome send attempt · Architecture component send attempt attempt outcome · Architecture component attempt outcome retry enabled? · non-streaming · Architecture component retry enabled? non-streaming return failure · Architecture component return failure full-jitter backoff · Architecture component full-jitter backoff redirect status? · Architecture component redirect status? return response · or status failure · Architecture component return response or status failure resolve Location · Architecture component resolve Location limit · valid? · Architecture component limit · valid? ProtocolError · Architecture component ProtocolError method · auth rules · Architecture component method · auth rules transport · timeout no yes HTTP response no 301 · 302 · 303 · 307 · 308 limit · invalid valid

Processing by attempt outcome

  • • Only a transport failure or timeout checks whether retry is enabled and the body is non-streaming. A qualifying attempt waits with full jitter and retries; otherwise it returns the failure.
  • • Only an HTTP response checks redirect status. A non-redirect returns the response or status failure; a redirect applies Location, limit, method, and authorization rules.