Does APIGEE have retry mechanisms?

I have an API endpoint , sometimes I get 503 from the target.
Is there any possibility to retry or re trigger the same request to the same target?

1 7 589
7 REPLIES 7

iambaskar

Thanks.
But the solution in the link redirects to different target server if the primary server goes down.
But in my case, I only have one target server and I have to retry it to the same server.

 

Then, the answer is no.  You cannot configure Apigee to automatically retry in the case of a single endpoint.  You may want to look to Application Integration, which allows retries, long running transactions, scatter/gather flows, and so on. 

But can you tell me, in what circumstances will a single endpoint respond with an error, and then in the next request (milliseconds later?), respond with success?  What is the circumstance you are planning for here?  

dchiesa1
Thanks for your response.
APIGEE api ->  service Endpoint(a) -> service Endpoint (b)
When APIGEE sends request -> to service Endpoint(a) -> it throws 503 when service endpoint (b) takes more time to respond.
But when this entire flow is retried, it gives successful response back.

I see. It sounds like you need to fix service endpoint b ?

Making Apigee retry ... is a fix in the wrong place. 

But this is just my opinion. 

How about creating 2 target servers with same backend/host? It might help Apigee to retry.

However,  +1 on @dchiesa1 comment on needing to fix your backends. 

I appreciate your input. However, I've successfully configured Apigee to automatically retry requests on single target endpoint using the following 

<HTTPTargetConnection>
<LoadBalancer>
<Algorithm>RoundRobin</Algorithm>
<Server name="targetserver1"/>
<MaxFailures>5</MaxFailures>
<RetryEnabled>true</RetryEnabled>
<ServerUnhealthyResponse>
<ResponseCode>500</ResponseCode>
<ResponseCode>502</ResponseCode>
<ResponseCode>503</ResponseCode>
</ServerUnhealthyResponse>
</LoadBalancer>
<Path>/dummy</Path>
</HTTPTargetConnection>