Layer 7 API Management

Expand all | Collapse all

Check for response time

Jump to Best Answer
  • 1.  Check for response time

    Posted 01-02-2020 12:07 AM
    Our client company uses the following settings for route via http(s):
    Connection Timeout (in milliseconds) : 10000
    Read Timeout (in millionseconds) : 30000

    However, when the results of API calls are confirmed by the Dashboard, the maximum response time for the back end is often more than 7 seconds.

    I wonder if this is a normal situation.

  • 2.  RE: Check for response time
    Best Answer

    Posted 01-02-2020 05:39 AM
    You can always check directly within the API itserlf by logging "httpRouting.latency" variable content right after your HTTPS Routing call, which will give you "backend" response time.
    What you're saying here is that you get average 7s backend processing time, with a defined read timeout of 30s, which on the configuration part, is correct.
    FYI we have some SAP backends which can take up to 40s, depending on what's being done as per defined business process.
    Now question being it normal or not, that's up to backend's developpers :)
    We had some very bad response times coming from ServiceNow API calls (>120s), but increasing processing power at SNow's end resolved it.

  • 3.  RE: Check for response time

    Posted 01-02-2020 07:23 PM
    There was a mistake in my article. I originally wanted to use 1s and 3s, but I wrote 10s and 30s.

  • 4.  RE: Check for response time

    Posted 01-02-2020 08:47 AM

    I would just add to what Philippe already said ... 

    back-end time is time that gateway waits from back-end to respond on request. 

  • 5.  RE: Check for response time

    Posted 01-02-2020 07:25 PM
    Correct errors in the text.

    Connection Timeout (in milliseconds) : 1000
    Read Timeout (in millionseconds) : 3000

  • 6.  RE: Check for response time

    Posted 01-03-2020 03:51 AM
    Comments still stands.
    Sometimes backends just... behaves.
    If client really need to *enforce* those limits, add necessary API logic to send back proper error code/detailed message to API caller.
    Maybe also better use some circuit breaker in your API, as backend can be slow for an extended period of time, due to maybe some processing/backup/etc.

  • 7.  RE: Check for response time

    Posted 01-20-2020 10:26 AM

    Even I face the same issue. (Check

    It looks like the backend service is streaming the response back to gateway and the whole response is not arriving on time.

    Even gateway docops agree to this -
    "The Read Timeout defines the maximum time (in milliseconds) allowed for response data (not necessarily the complete response) to be read for the outbound request. If exceeded, the routing fails (or failover)"

    So, the timer starts again and again waiting for the response.

    Also, the reason for this could be the latency, as I am facing this issue as well :-)
    Check (

    Check if the backed service is actually taking 7 seconds to complete or less.