Hi,
We would like to return a timeout error if the proxy takes longer than we want. So for this, we have set the api.timeout as a property in <HTTPProxyConnection>. See below...
<HTTPProxyConnection> <BasePath>/v1/blah</BasePath> <Properties> <Property name="api.timeout">500</Property> </Properties> <VirtualHost>default</VirtualHost> <VirtualHost>secure</VirtualHost> </HTTPProxyConnection>
This works fine. When the request takes longer than 500ms, then a 504 error is returned.
However, one of the conditional flows within the proxy endpoint takes a bit longer than the other flows. Rather than increase the timeout value to cater for the longer time, is there a way to set different timeouts? I would like to keep this conditional flow in this proxy endpoint if possible.
Solved! Go to Solution.
Nope, I think you cannot use a variable there.
But you have options.
specify a separate ProxyEndpoint, with... basically has the same configuration, but a different basepath, and a different timeout.
<HTTPProxyConnection> <BasePath>/v1/blah/foo</BasePath> <Properties> <Property name="api.timeout">1500</Property> </Properties> <VirtualHost>default</VirtualHost> <VirtualHost>secure</VirtualHost> </HTTPProxyConnection>
This will work if you can distinguish the "slow" flow from the "non-slow" flows by basepath.
You can include this proxyendpoint into the same proxy bundle as the original proxyendpoint, and Apigee Edge will do the right things with regard to routing of inbound requests.
Nope, I think you cannot use a variable there.
But you have options.
specify a separate ProxyEndpoint, with... basically has the same configuration, but a different basepath, and a different timeout.
<HTTPProxyConnection> <BasePath>/v1/blah/foo</BasePath> <Properties> <Property name="api.timeout">1500</Property> </Properties> <VirtualHost>default</VirtualHost> <VirtualHost>secure</VirtualHost> </HTTPProxyConnection>
This will work if you can distinguish the "slow" flow from the "non-slow" flows by basepath.
You can include this proxyendpoint into the same proxy bundle as the original proxyendpoint, and Apigee Edge will do the right things with regard to routing of inbound requests.
Oh thanks for your response. It would be nice if it accepted a variable!
Unfortunately, I had already looked at these 2 options and they won't work for us. We need them to have the same basepath. Also, there is no target endpoint for this scenario.
Thanks anyway!