On policies, one of the attributes on the root element is "async". The docs say it's for internal optimization only. Should this attribute be ignored? Left at the default of "false"? If not, how should it be used?
Solved! Go to Solution.
I think its a bit of a misnomer. When we say async, it doesn't mean the policy would be executed asynchronously. The internal optimisation that it refers to, if I were to explain that in layman's term - the policy execution is off-loaded to a different thread, while the thread serving the request is free to pickup additional request and come back to the worker thread once the processing is complete. In certain cases, it makes sense to set it to true, but largely it can be left as default. I agree that it would be good to document this in our docs so that its clear to the proxy developers.
AFAIK we can enable for policies which we think can take more time so that it can improve / not degrade the performance of the whole API and other APIs deployed together and we should also be extra careful in not enabling for too many policies as context switching between threads can be expensive.
@arghya das Any tips around this or any specific cases where you think we should enable it ?