Define JAMstack sites performance

Since building sites with JAMstack became more popular, it’s interesting to track their perf distribution.
The problem I see during building the query is defining if the site built via JAMstack or not.
The starting point might be CDN. If it’s served e.g. Netlify than definitely, it’s a JAMstack site.
Really interested in community point of view. Thanks)

The first (and most difficult) question is how to detect a website built on a JAMstack. I’m not very familiar with it, but according to https://jamstack.wtf it seems more like a technique rather than a technology, so I’d imagine detections would be heuristic-based and less reliable.

@denar90 do you know what signals we could use to detect the sites? I can help map those to HTTP Archive data points and write a corresponding query.

1 Like

As much as I know, first of all it will be static html markup. It’s served mostly by Netlify but in any case we can add more CDNs later after deeper investigation.

I have no idea what other signals could be used. That’s why I tagged Phil on Twitter so probably he knows some tricks)

Ah ok. I detect Netlify as part of ismyhostfastyet.com so that’s doable: https://github.com/rviscomi/ismyhostfastyet/blob/master/ttfb.sql#L14

1 Like

Wow, that’s a great starting point :+1:

I’ll try to play with query and get back with results.

Thanks, Rick.

1 Like

So, based on your query far I come up with this one (ignore country and device type, I just selected them to make query a bit cheaper)

#standardSQL
SELECT
  COUNT(DISTINCT origin) AS n,
  SUM(IF(ttfb.start < 200, ttfb.density, 0)) / SUM(ttfb.density) AS fast,
  SUM(IF(ttfb.start >= 200 AND ttfb.start < 1000, ttfb.density, 0)) / SUM(ttfb.density) AS avg,
  SUM(IF(ttfb.start >= 1000, ttfb.density, 0)) / SUM(ttfb.density) AS slow
FROM
  `chrome-ux-report.country_ua.201907`,
  UNNEST(experimental.time_to_first_byte.histogram.bin) AS ttfb
JOIN
  (SELECT url, REGEXP_EXTRACT(LOWER(CONCAT(respOtherHeaders, resp_x_powered_by, resp_via, resp_server)),
      '(netlify|x-github-request)')
    AS platform
  FROM `httparchive.summary_requests.2019_07_01_desktop`)
ON
  CONCAT(origin, '/') = url
WHERE
  platform IS NOT NULL
ORDER BY
  n DESC

Results are pretty interesting

{
  "n": "587",
  "fast": "0.41400640895945684",
  "avg": "0.5301053498485957",
  "slow": "0.05588824119194424"
}

Hence, in Ukraine, 50% of JAMstack sites (definition based on Netlify and Github) are waiting for TTFB from 200ms to 1sec. Which is huge. I suppose Github might have a big influence, I already faced similar issues - https://github.com/nasa/code-nasa-gov/issues/49

Will proceed further with other metrics)

UPD: code formatting

1 Like

Ok, I’ve run query for all countries against FCP and JAMStack looks fast (only 6% of sites are slow). That’s cool.
What we need to have a representation of all web is improved line where we grep url netlify|x-github-request.

[
  {
    "n": "13760",
    "fast": "0.5909",
    "avg": "0.3443",
    "slow": "0.0648"
  }
]
#standardSQL
SELECT
  COUNT(DISTINCT origin) AS n,
  ROUND(SUM(IF(bin.start < 1000, bin.density, 0)) / SUM(bin.density), 4) AS fast,
  ROUND(SUM(IF(bin.start >= 1000 AND bin.start < 3000, bin.density, 0)) / SUM(bin.density), 4) AS avg,
  ROUND(SUM(IF(bin.start >= 3000, bin.density, 0)) / SUM(bin.density), 4) AS slow
FROM
  `chrome-ux-report.all.201907`,
  UNNEST(first_contentful_paint.histogram.bin) AS bin
JOIN
  (SELECT url, REGEXP_EXTRACT(LOWER(CONCAT(respOtherHeaders, resp_x_powered_by, resp_via, resp_server)),
      '(netlify|x-github-request)')
    AS platform
  FROM `httparchive.summary_requests.2019_07_01_desktop`)
ON
  CONCAT(origin, '/') = url
WHERE
  platform IS NOT NULL
ORDER BY
  n DESC

1 Like