Shared Flows vs Service Call Out?

Assuming both are doing the same job, are Shared Flows faster or slower than Service Call Out?

0 3 131
3 REPLIES 3

I'm not sure I understand your question.

A shared flow helps you reusable policy/s/ configuration across your proxies. Service callouts are for sending a request to an endpoint.

In our company, there is a Service Callout that is simply used to verify that we sent the correct JWT token (it's self hosted and doesn't target any server). And it's called in almost every policy that we have.

I was thinking of moving that logic in a Shared Flow. So I wanted to know if this might improve the speed or not.

Through a shared flow, your api proxy/s will still invoke the same policies in the same way.

However, you get benefits such as if needing to update policies within the shared flow, you only need to update it in a single place.

With that said, if you have a policy generating the same JWT or getting a token back, or the backend response is the same ie elements that are cacheable, using caching can help.