# Define JAMstack sites performance

**URL:** <https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713>\
**Category:** Analysis\
**Created:** [August 20, 2019, 8:50pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713 "2019-08-20T20:50:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [August 20, 2019, 8:50pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/1 "2019-08-20T20:50:38Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [August 20, 2019, 9:11pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/2 "2019-08-20T21:11:57Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [August 21, 2019, 11:58am UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/3 "2019-08-21T11:58:45Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [August 21, 2019, 3:58pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/4 "2019-08-21T15:58:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [August 21, 2019, 8:21pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/5 "2019-08-21T20:21:20Z")

</div>

Wow, that’s a great starting point 👍

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

Thanks, Rick.

---

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [August 22, 2019, 9:09pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/6 "2019-08-22T21:09:38Z")

</div>

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)

```sql
#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

```sql
{
  "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](https://github.com/nasa/code-nasa-gov/issues/49)

Will proceed further with other metrics)

UPD: code formatting

---

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [August 23, 2019, 9:44pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/7 "2019-08-23T21:44:10Z")

</div>

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`.

```sql
[
  {
    "n": "13760",
    "fast": "0.5909",
    "avg": "0.3443",
    "slow": "0.0648"
  }
]

```

```sql
#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

```

---

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [October 31, 2019, 8:14pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/9 "2019-10-31T20:14:33Z")

</div>

Also there are some results related to CrUX data. JAMstack sites are really fast on mobile, almost the same numbers as on a desktop.

 ![ttfb-jamstack-img](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/0/00b89c0f0a9ddc1b7bb9f36f1269662362bb1456.jpeg)

 ![TTFCP](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/9/9ab5a2239b717876e2c0ba0ea5f7326b4d7998a5.png)

 ![FID-crux-jamstack](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/4/4bf6c78081874cad00e485b95a70f9bbb012f76b.jpeg)

---

<div class="post-metadata">

**Author:** ![denar90](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/denar90/32/1328_2.png) [@denar90](https://discuss.httparchive.org/u/denar90)\
**Post date:** [November 19, 2019, 2:28pm UTC](https://discuss.httparchive.org/t/define-jamstack-sites-performance/1713/10 "2019-11-19T14:28:11Z")

</div>

All this stuff was kinda aggregated in one article

> **[A Look at JAMstack's Speed, By the Numbers | CSS-Tricks](https://css-tricks.com/a-look-at-jamstacks-speed-by-the-numbers/)**
>
> People say JAMstack sites are fast — let’s find out why by looking at real performance metrics! We’ll cover common metrics, like Time to First Byte

In case someone interested 🙂
