{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Analytics /
avatar image
8

When can the Average Total Response Time be less than the Average Target Response Time?  

  • Export to PDF
Dino   created · Apr 10, 2015 at 12:55 AM · 2.5k Views · edited · May 31, 2017 at 12:26 AM

The Analytics capability in Apigee Edge is *really nice*. It's super valuable to be able to see so many statistics for all the API calls flowing through Edge for you.

But sometimes Analytics shows things that look surprising. Here's a puzzle for you: When can the Average Total Response Time be less than the Average Target Response Time?

Some definitions are in order: The Total Response time is the total time for a single call into the proxy to return. The Average of that quantity is just an aggregate over all calls into the Edge Proxy: Tally up all the API requests sent by all the apps on all the various devices out there, and divide by the aggregate total response time, and you have the Average Total Response time.

The Target Response time is similar, except it quantifies the response time observed for the target - in other words the backend system. The system *behind* the proxy.

And the Average of that quantity is likewise, just an aggregate over all calls that get returned by the Target.

Now, clearly you can see that for any given call, the Total Response time will be greater than the Target Response time. Apigee Edge is pretty cool, but one thing it does not do is violate the laws of physics, or exceed the speed of light. Sometimes the policies in an Edge proxy run very quickly - in fewer than 10ms total. But that number is always greater than zero. Edge takes *some time* to do its work. Total Response time = Target Response Time + Time spent in Edge. Therefore Total Response time will always be greater than Target Response time. Right?

The question is: Can it ever be possible that the Average Total Response Time is less than the Average Target Response Time? If, for every call, the Total Response time is greater than the Target Response time, then the averages ought to exhibit a similar relationship, right?

Well, check this out:

This shows clearly that the Average Total Response time is LESS than the Average Target Response time. How is this possible?

Here's how:

Not all calls that are processed by Edge flow through to the backend system. There are some calls that are handled entirely by Edge itself. For example, any API call which is satisfied from cache, will not invoke the backend target system. An API call that issues an OAuth token, or revokes an OAuth token, will likewise not connect to a backend target system.

Also, it stands to reason that the calls into Edge that do not connect to a backend system will complete more quickly than the calls that DO connect to a backend system. These "faster" calls tend to cause the computed Average Total Response time to decline.

The mystery dissolves when we acknowledge the unfounded assumption. The assumption is that Total Response time is always greater than Target Response time. This is true when there is a call to the target. It isn't strictly true when there is no target call at all.

Problem solved.

So if you see a chart that shows your Average Target Response time is higher than your Average Total Response time, now you know how it is possible.

Thanks to Oscar Ponce @oponce@apigee.com for explaining this to me!

screenshot-20150220-101413.png (503.5 kB)
thub.nodes.view.add-new-comment
edgeanalyticsresponse
Add comment Show 3
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image clatimer1 ♦ · May 03, 2015 at 11:27 PM 0
Link

Interesting! Great write up. I think you could make the case that the target response time for in-proxy-only responses should be zero, but that could have the consequence of skewing the target time downwards which may also be misleading.

avatar image psunda · Jun 29, 2017 at 04:33 AM 0
Link

@Dino

We have a Node JS target with asynchronous calls being made to the backend system. The reports indicate that total response time is less than target response time.

avatar image Dino ♦♦ psunda   · Jun 30, 2017 at 12:35 AM 0
Link

yes. And are there any calls that do not proceed to the (nodejs) target? It would make sense according to the explanation I provided above, if that were the case.

Article

Contributors

avatar image avatar image

Follow this article

7 People are following this .

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Navigation

When can the Average Total Response Time be less than the Average Target Response Time?

Related Articles

Simple example of analytics in Google Sheets

Querying analytics APIs in Apigee Edge

Private Cloud (OPDK): How to extend custom report time frames in UI in 4.15.07

Tutorial: Apigee Analytics Custom Reports

Known Issue: Analytics reports are showing "na", "unknown", "not set", "(not set)" in reports

Analytics Data retention policy in Public Cloud

Using Excel for API Transaction and Analytic Reporting

sre / product owners - top analytics queries

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges