API performance optimization

Hi All,

Had an Flow Service created in IS, with multiple REST calls. Found out that with the multiple REST calls the Service is taking time to respond to consuming flow service. Is there a best practice that we can use to optimize the service? Have about more than 8 REST calls, the service is taking up to 50sec or more.

Thanks,
Mark

Can you provide the technical details of the flow service?

Hi Mahesh,

So I have a service that is utilizing pub.client:http to call a REST API. What the service does is it gets data from downstream using pub.client:http but before it get data, there are some processes that needs to be done first, it would first call another REST API to get data from there and then another REST API to get another data, you get the idea, then those data will be used as input to get data from the last REST API call.

So what i did was to cache some calls, but can only apply to few and the service is still taking time to respond.

Thanks,
Mark

From what I understand is you have several service invocations underneath and it does take time.

Do you have any client timeouts and what should be the overall service execution time?

Yes we have implemented timeouts in the properties tab. we are targeting an execution time of less than 10s.

From what I have read caching can help and we have it already implemented. Was wondering if there are other ways to lessen the execution time or do we have to simplify the service. Just seeking for advise or ideas.

Thanks,
Mark

Yes, you can cache the service output if the subsequent requests to this service do not change the responses. In addition to this make sure to disable (remove) the logging for the services for the happy scenario (try sequence) and them in case of error.

If you can send me the service details on a email it would be helpful to suggest some more optimization.

Sorry I’m not allowed.

I’ll try to explore more on the logic of the service, there might be something that I could enhance there.

Thank you anyway, I appreciate the response.

Hello Mark,

Maybe you could find some helpful pointers in these 2 blog posts that I wrote some time ago.

https://wm-explorer.com/coding-guidelines-in-webmethods-is-fourth-part/
https://wm-explorer.com/coding-guidelines-in-webmethods-is-fifth-parth/

Thank you so much. I really appreciate it.

No worries! Get back if you need any more details.