Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

What are the pros & cons of making HTTP calls from JavaScript policy

We have a requirement of calling cache related policies in loop. Since Apigee does not support looping of policies, we were trying to implement it using one of these approaches below:

1) Having the caching logic in a separate proxy and invoking the new proxy via HTTPclient in a loop, from a JavaScript policy.

2) Calling a shared flow X number of times, (but here X has to be a static number)

Since approach 2 is less dynamic design, we want to understand what are the risks if we opt for approach 1.

After reading some community posts and Proxy chaining documentation, we understand that every HTTP call made from JavaScript policy will involve a network hop (i.e. a round trip to Apigee Load balancer). And, number of API calls are directly related to Pricing, so we also need justification if we go with approach 1.

1 9 839
9 REPLIES 9
Top Solution Authors