What is the disadvantage of increasing the time limit of JavaScript policy in Apigee Edge?

Hi Apigee Community,

I have a http client code in my JavaScript policy, so some httpClient request takes a long time due to different factors like backend or network issues. I am planning to increase the timelimit of JavaScript policy to 15 seconds, what can be the downside of my action? Any best practice for the timelimit of excution of JavaScript policies? 

Solved Solved
0 1 166
1 ACCEPTED SOLUTION


@Checkmaterz10 wrote:

I am planning to increase the timelimit of JavaScript policy to 15 seconds, what can be the downside of my action? Any best practice for the timelimit of excution of JavaScript policies? 


The downside is that ... your JS will "give up" more lazily.  If you have a low likelihood of the JS hanging up or spinning, then ... there's no appreciable downside.  If you have a higher likelihood that the JS will have errors and run long, then.... a larger timeout could cause some "noisy neighbor" effects on other API calls being handled by the proxy, if you have high concurrency and high load.  If you have low or moderate load, then... it won't matter. 

In summary, it's probably not going to affect you. 

View solution in original post

1 REPLY 1


@Checkmaterz10 wrote:

I am planning to increase the timelimit of JavaScript policy to 15 seconds, what can be the downside of my action? Any best practice for the timelimit of excution of JavaScript policies? 


The downside is that ... your JS will "give up" more lazily.  If you have a low likelihood of the JS hanging up or spinning, then ... there's no appreciable downside.  If you have a higher likelihood that the JS will have errors and run long, then.... a larger timeout could cause some "noisy neighbor" effects on other API calls being handled by the proxy, if you have high concurrency and high load.  If you have low or moderate load, then... it won't matter. 

In summary, it's probably not going to affect you.