Target Response Flow is taking more time to process the response

Not applicable

I have a proxy where

  • my backend is taking ~1.2secs for 12mb data and
  • when it enters into target response flow i could see a delay of ~8 secs .

I haven't added any policies in the target flow.Can anyone please help with why its taking more time in target response flow? (attached screenshot for reference)

6857-capture.png

More info : I am using on-premise version 4.17.01. Is there any configuration which i am missing?

0 1 331
1 REPLY 1

Not sure what step you are highlighting there. It's not quite clear because you've clipped it. I think that might be the phase that handles response reception.

Here's the thing - transmitting data takes time.

If the two systems - sender and receiver - are on the same LAN, sending a little data takes "a little bit of time".

if the two systems are connected across a WAN, it takes a little more time.

If the two systems are connected across 2000 miles via the public internet, much more time.

If the data is small (<1kb), it takes a small amount of time.

If the data payload is large, (12mb), then it takes a larger amount of time.

Let's call the time it takes for one system to send data to another, and the other to receive it, the "transit time". HTTP is a request/response protocol. This transit time applies to both the request and the response. If the request is small, then it can be fast. If the response is large, it can take a long time to go from system1 to system2.

You said your backend spent 1.2 seconds performing work; it's possible that number neglects the transit time.

It may take a system 1.2s to fulfill a request (Read a database, perform a query, etc), and it may take an additional 8s to transmit the resulting response data back to the requester!

How much time is "the right amount of time" ? It depends on your network interface. If you look at this page, it tells me that it takes about 13 seconds to transmit 12mb over a 1 megabit network link (assuming 10% network overhead, which is probably optimistic). If your effective network capcity between the two links is about 2 megabits/s, then you can expect an 8 second transmit time for 12MB payload.

and that is a theoretical maximum. If your Apigee Edge system is under load, then there will be contention for memory, I/O, and CPU, which can add to the time it takes Apigee Edge to receive the response. This can be true for free trial Apigee Edge systems, in which many "tenants" are sharing the same servers in the cloud. Those systems are under constant load.

It can also be true if you have dedicated servers (as with most commercial Apigee Edge licenses), and are sending lots of requests. In that case your 12mb response can take a longer amount of time, due to contention.