AnsweredAssumed Answered

Low TTFB and high download time with Akamai

Question asked by Rahul Nanwani on Jun 17, 2017
Latest reply on Jul 3, 2017 by Gunther Kochmann

We are using performance API to measure different metrics for the whole request/response lifecycle and compared the result of Akamai, CloudFront, Fastly and BitGravity.

 

We inserted our RUM scripts on our and customer's website and collected around 2M data points in India.

 

The common trend so far is:

  • Low TTFB on Akamai vs high TTFB on CloudFront (which should be good for bots)
  • High download time on Akamai vs low download time on CloudFront (this matters in our case because images only renders when downloaded completed, mostly non-progressive)

 

Our test object sizes are 15KB, 20KB and 35KB. All objects are images and our script attaches a query param to skip browser cache, but CDNs are configured to ignore query param, hence always a HIT on CDN. Both the Akamai and CloudFront points to the same origin and have been configured with same settings.

 

Test object's URL

 

The script being used:

 

var duration = window.performance.getEntriesByName(resourceName)[0].responseEnd-window.performance.getEntriesByName(resourceName)[0].requestStart;var ttfb = window.performance.getEntriesByName(resourceName)[0].responseStart-window.performance.getEntriesByName(resourceName)[0].requestStart;

 

The same can be checked on https://imagekit.io (rum.js)

 

I would love to understand how does Akamai starts streaming response early but ends up late?

Outcomes