Target Response Flow is taking more time to select target response flow

Not applicable

I am hitting to my node target it is giving response within 1 ms
but target response flow started Pipe taking more time.

My Node JS response is also only 9.8 kb

Please help me to improve latency

7252-node.png

7253-targetrespone.png

0 4 386
4 REPLIES 4

Thanks for the question. How consistent is this behavior? Does it occur when you send a single request into the API Proxy, or does it occur only when running under load? If under load, how much load (characterize the throughput).

Does it always occur? or only sometimes?

Do you have other transactions flowing through your system?

Is this an Apigee Edge trial system?

If your nodejs target begins writing the response quickly, but is slow to close the stream, you may experience this behavior. My advice if that is the case: fix your nodejs code to be cleaner and call response.send(). or whatever is appropriate to the framework you are using.

I am testing this with 12k responses and seeing <1ms in the "Target Response Flow Started". Conversely if I insert an explicit delay in the nodejs server of 940ms, then I see that it takes 943ms in the "Target Response Flow Started".

If none of these suggestions are helpful, then I suggest you break it down. Create a simple test case. Eliminate all the other policies. Use a stripped-down nodejs target. See if you observe the same behavior with the response pipe.

Hi @Dino-at-Google,

This is happening during load, the load is around 600 tps.

We have our own on premise environment.

We have used response.send() to give mocked response.

We have tried with simple proxy with 2 policies only but still response pipe is taking time.

But this is not for all calls few calls are taking more time due to which there is increase in avg. response time and resulting into low tps.

ok, under those circumstances, I'd suggest examining the stress on the machine itself. CPU? IO? Network? This is just a standard troubleshooting and diagnostics effort for OPDK. There's an OPDK troubleshooting guide, you should check it out and follow the guidance on that.

Thanks for help @Dino-at-Google

This scenarios is coming when stress of CPU is reaching upto 0.8, even NIO is also under control.
But why only response target pipe is taking more time even when Node JS is giving response within few milli seconds.