GraphCDN now supports retrying some failed requests right from the edge cache. Instead of your application having to trigger a second network request, we can take care of that.
Retries are available for two types of errors, so-called
Network Errors
, i.e. any responses with an HTTP status code of 502, 503, 504, or in the 520 to 527 range. For those errors (and if HTTP status codes are used semantically correct) a retry might return a valid response as the underlying error condition might have been resolved.
The second category is
Server Errors
, which includes all other HTTP/5xx status codes. In those cases, the chance of resolving the issue with a simple retry is lower, but it might still be a temporary issue and we want to give you the chance to decide whether to try again or not.
By default, any GraphCDN service is configured to
not retry
any requests. If you want to enable retries you need to set this up for each of your services.
To enable retries, configure them in your
configuration file and push the new configuration to your service via
graphcdn push
name: my-app-with-retries
# (your other GraphCDN configuration)
# ...
isEnabled: true
whenGraphQLResponse: false
isEnabled: false
option shown above indicates whether you want to retry a request even if the response includes a valid GraphQL payload. By default, any requests containing a valid GraphQL response won't be retried.