Skip to main content
January 21, 2022
Question

MNI on integration taking more time

  • January 21, 2022
  • 9 replies
  • 0 views

Hi,

I have an integration that calls the target database through APIGEE. I have CDT of array which is array So the integration need to be called n number of times in parallel using MNI. I see the request sent to APIGEE for all the 11 records (test data had 11 records) available in the CDT sent at the same time but the response received by appian is taking more time even though APIGEE sent the response back under a second for all the 11 requests. Below are the apigee and appian logs. The duration increases for each thread in appian which seems strange when apigee sent the response in less than a second.

APIGEE log:

Request 1 till 11 received at 9:52:08 AM

Response 1 till 11 sent in 300 micro seconds at the max making it a response sent in less than a second

Appian process nodes

Request         Started             Completed             Duration


Request 11     9:52:08 AM       9:52:16 AM       8.193 secs
Request 10     9:52:08 AM       9:52:16 AM       7.543 secs
Request 9       9:52:08 AM       9:52:15 AM       6.626 secs
Request 8       9:52:08 AM       9:52:14 AM       5.991 secs
Request 7       9:52:08 AM       9:52:13 AM       5.355 secs
Request 6       9:52:08 AM       9:52:13 AM       4.665 secs
Request 5       9:52:08 AM       9:52:12 AM       4.020 secs
Request 4       9:52:08 AM       9:52:12 AM       3.399 secs
Request 3       9:52:08 AM       9:52:11 AM       2.571 secs
Request 2       9:52:08 AM       9:52:10 AM       1.974 secs
Request 1       9:52:08 AM       9:52:09 AM       1.012 secs

9 replies

stefanhelzle0001
Brainy
January 22, 2022

Appian process execution is made to scale in number of simultaneous active processes, not in lowest execution time for a single node. MNI in parallel does not ultimately mean that each node instance runs at the exact same time.

Is that an issue in any way?

Also see community.appian.com/.../lag-using-call-integration-smart-service

January 25, 2022

Hi Stefan,

I was under the assumption that if i run 10 requests in parallel using MNI then it would take less time than the sequential call. For example, if sequential approach take 10 seconds overall to complete the 10 requests processing then the parallel would take around 5 seconds or less to complete all the 10 parallel calls. We have a requirement where we need to make parallel calls for N number of requests to load data for user interaction. Right now, 10 calls is taking more 15 seconds to load data on the page and when I see the MNI integration, its taking most of the time taken for completion of execution.

stefanhelzle0001
Brainy
January 25, 2022

If this is just about loading data, why doing MNI? Can't you do that in an expression?

stewart.burchell
January 26, 2022

Firstly, I'd challenge the design. Performance is greatly affected when making calls across the network. It would be better to make a single call to the API endpoint with your array of data and have it locally process that array. If it can't do that today then it's worth discussing with the API provider to see if they can make a change to support that.

Secondly, whilst Appian can make multiple concurrent calls in the way you describe there's no guarantee that the end point can handle the concurrency that you're inflicting upon it. It may queue your requests and so your desire for parallelism may be thwarted anyway and reduced to serialization. Again, a discussion with the API provider might open up some avenues for improvement.

February 3, 2022

Hi Stewart,

We did discuss it with the API provider but they refused to build the API to handle array input (to handle this parallel processing at their end) stating it would timeout (I know its weird but they are not ready to implement it). I saw the start time of all the thread in Appian were same and I also verified the target system start/end time for each of these calls. The start time was almost the same for all threads at their end with some milli seconds difference for few threads and the end time also were almost the same. Appian took more time to complete the integration configured as MNI.