Question on Apigee architecture supporting streaming API

Not applicable

We are working on an API that enables multipart file upload/download of document. The apiproxy is designed to use streaming option on proxy endpoint as well as on target endpoint. As you might know, in the multipart file transfer mode, browser transfers file in chunk.

My questions are,

1) If file is big and takes several minutes for the file transfer operation then will this implementation hold up thread on Apigee side(Router/Message Processor) during entire duration?

2) If the default timeout settings needs to be updated for supporting long running proxy execution, could it be done at proxy level?

Solved Solved
0 4 335
1 ACCEPTED SOLUTION

@Sandip Dhummad answers inline below. Let me know if you have further questions.

  1. If file is big and takes several minutes for the file transfer operation then will this implementation hold up thread on Apigee side(Router/Message Processor) during entire duration?
  2. If the default timeout settings needs to be updated for supporting long running proxy execution, could it be done at proxy level?
    • Yes you can set the “api.timeout” property on the ProxyEndpoint. But you need to also configure the Load Balancer, Router and Message Processor to timeouts to be greater than the largest “api.timeout” you expect from the ProxyEndpoint else well.
    • You also need to be careful, because changing the LB, Router and MP timeouts can cause unexpected performance issues if your other ProxyEndpoints do not specify their own “api.timeout”. So I would suggest setting “api.timeout” on ProxyEndpoints that don’t require a long timeout to use lower timeouts.
    • See https://docs.apigee.com/api-platform/reference/policies/endpoint-properties-reference for more details (search for api.timeout)

View solution in original post

4 REPLIES 4

@Sandip Dhummad answers inline below. Let me know if you have further questions.

  1. If file is big and takes several minutes for the file transfer operation then will this implementation hold up thread on Apigee side(Router/Message Processor) during entire duration?
  2. If the default timeout settings needs to be updated for supporting long running proxy execution, could it be done at proxy level?
    • Yes you can set the “api.timeout” property on the ProxyEndpoint. But you need to also configure the Load Balancer, Router and Message Processor to timeouts to be greater than the largest “api.timeout” you expect from the ProxyEndpoint else well.
    • You also need to be careful, because changing the LB, Router and MP timeouts can cause unexpected performance issues if your other ProxyEndpoints do not specify their own “api.timeout”. So I would suggest setting “api.timeout” on ProxyEndpoints that don’t require a long timeout to use lower timeouts.
    • See https://docs.apigee.com/api-platform/reference/policies/endpoint-properties-reference for more details (search for api.timeout)

I understand the dependency about ELB timeout, but why the proxy timeout is really dependent on Router/Message Processor timeouts? I understand you want to have limit set at underlying platform level(like Router/Message Processor), but do we also have any flexibility of being able to provide override at a proxy level? This feature will help avoid extending timeouts at platform level, just because only 1/2 proxies needed longer timeout.

Appreciate the feedback. I will pass it back to PM to see if this is something they can provide in the future.

Thanks Joey for your help!!