High response time in Edge Microgateway layer

anuprai
Participant IV

We are seeing high response time for edgemicro API. Edge microgateway is adding extra 300 ms to 500 ms time apart from backend response time. This is observed during local testing and even during performance testing.

Below are the metrics for one of the edgemicro API -

Average time - 362.06 ms
Average Proxy time - 241.47 ms
Average target time - 120.59 ms

In plugins we have only oauth, quota and spikearrest.

What could be the reason for this high latency. We are running a single instance of microgateway in a docker container.

Solved Solved
0 7 325
1 ACCEPTED SOLUTION

anuprai
Participant IV

Issue got fixed after turning on the cache for apikey and tokens by adding below parameters in oauth plugin -

cacheKey: true
tokenCache: true

View solution in original post

7 REPLIES 7

Not applicable

can you check which policy is taking a long time? Also can check network latency.

During performance testing or big payload processing this latency is expected.

This is a plane passthrough proxy without any policies configured. Also how can we check the policy time taken in edge microgateway as these transactions does not come in trace?

We see most of the time spent is in Apigee request and response processing excluding the backend response time.

Test is done with GET call with very few fields in response.

What is the server configuration? That would do slow processing?

anuprai
Participant IV

Issue got fixed after turning on the cache for apikey and tokens by adding below parameters in oauth plugin -

cacheKey: true
tokenCache: true

Hi,

I had the same problem, where do i make this change? Which file?

Hello Joao make this change in microgateway config file inside .edgemicro directory under oauth

oauth:
cacheKey: true (add this)
allowNoAuthorization: false
allowInvalidAuthorization: false

It worked!

Tks