Service response time
search cancel

Service response time

book

Article ID: 266528

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We need to measure the response time of a service that is critical since it is used by many of our clients.

They tell us that the service that is published in the API Gateway is sometimes taking too long and generates a timeout in their applications

For reference, the service is as follows:

We want to include an audit to write in a log the start time, the end time, and the total duration of the service in the API Gateway

Is there a variable available with the total duration of the policy and current time?

Is there a recommended way to measure it?

 

Environment

Release : 10.0

Resolution

Gateway performance we can add audit in policies to determine were the delays are 

Example for Route issue Add Audit Detail assertion before route

Policy#: ${assertion.numberstr}; assertion.latency=${assertion.latency.ms}; elapsedTime=${request.elapsedTime}

ROUTE ASSERTION

Add Audit Detail assertion after route 

Policy#: ${assertion.numberstr};  assertion.lat=${assertion.latency.ms}; backend.lat=${httpRouting.latency}; ElapsedTime=${request.elapsedTime}; ClientPort: ${request.tcp.remotePort}; ClientIP: ${request.tcp.remoteHost}; URI ${request.http.uri};  Method:  ${request.http.method};  Size:  ${request.mainpart.size}; GatewayTime: ${request.time}: Http-Reascode: ${httpRouting.reasonCode} Http-Status: ${response.http.status}

The context variables can be put in the beginning of the policy and end to determine total time 

https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-1/reference/context-variables.html