This issue captures all the related work occurring to decide if moving our Gatsby Sites to Gatsby Cloud make sense.
Other sites to consider
- Docs --> Sprint 3
- OSS ---> Sprint 4
- Dev ---> Sprint 4
- Private docs ---> Sprint 5
- Bulk-edit private docs ---> Sprint 5
DOCs #1933
OSS newrelic/opensource-website#757
DEVnewrelic/developer-website#1270
Private DOCs newrelic/docs-website-private#5
BETA DOCs newrelic/private-docs-site#45
DOCS https://github.com/newrelic/docs-website/issues/1809
OSS https://github.com/newrelic/opensource-website/issues/748
DEV https://github.com/newrelic/developer-website/issues/1248
_A “cold build” will start from scratch, while a “warm build” will reuse what it can from a cache._
relates to issue #1661
TBD
TBD
Incremental builds will function very similarly for MDX content as it does for other types of content (e.g. CMS content) - the degree of incrementalism is predicated on the degree to which a component is shared among other MDX files. An existing cache is a basis for incremental builds. Needs something to validate against. So, if the changed content is only local to that MDX file, and there is an existing cache, then only that MDX file would be rebuilt. If the content, however, is shared among multiple MDX files.. and there's further sharing among the dependent MDX files, then there would be more page queries that become invalidated, thereby resulting a slower incremental build.
[CWL_THROTTLING_EXCEPTION: The maximum request rate permitted by Amazon CloudWatch Logs has been exceeded for your account. Error message: Rate exceeded]
CreateLogStream
50 transactions per second (TPS/account/Region), after which transactions are throttled. You can request a quota increase
On Thursday April 1st, we merged https://github.com/newrelic/docs-website/pull/1660 into main. The merge was detected by Amplify, built, and deployed. On Friday April 2nd, we merged https://github.com/newrelic/docs-website/pull/1674 into main and Amplify _did not_ detect it. This meant that work we intended to be released was stuck in limbo until we could manually trigger another release. (This is a big red flag, in my opinion - Z)
Gatsby has set up Docs Site on an instance of Gatsby Cloud for benchmarking and here some initial results. This doesn't include an upgrade to Gatsby V3, which should also improve build times.


I've asked Luke if we eventually move the Dev Site and the OSS to Gastby Cloud, if there is an additional cost for that, I've been thinking about it lately I don't think we need to migrate those sites off Amplify at this time, but may consider it in the future to consolidate our sites into one place, but I don't feel it's neccessary to that now. @zstix / @polfliet thoughts?
If we're not experiencing as many problems with the other sites being on Amplify, then I suppose we don't _need_ to migrate them. That said, I'm a little hesitant to ask our engineers to support two different hosting platforms.
In my mind, it sorta depends on how long it would take to migrate _all_ our sites to the same platform (and the cost difference).
@zstix totally agree. I'd like to be on one platform ideally for all our gatsby sites, perhaps this is a follow up task to move the OSS / Dev site over after we move the Docs Site over. Could be considered sustaining work.
@zstix After our discussion here is a proposed migration schedule, let me know what you think.
Sites to migrate
Docs --> Sprint 3
OSS ---> Sprint 4
Dev ---> Sprint 4
Private docs ---> Sprint 5
Bulk-edit private docs ---> Sprint 5
Need to answer the following: to setup our enterprise Gatsby cloud test account (this account will convert to our actual account if we decide to switch to gatsby cloud) is there a service account we use for this type of stuff? It's tied to Github authentication.
Gatsby suggests we tie this to new relic the org, not an individual account.
the recommendation was:
As far as I know, "service accounts" aren't a specified thing with GitHub. I believe the closest thing they have is what's coined a machine user (which is more or less just a bot). That's really just a personal account that we limit to your use case and we'd grant it membership to the newrelic organization.
Currently blocked on vendor review, will take ~7-10 business days
jira VRI-8985 for the security review
This is now requiring GM approvals. đź§·
I took a shot at comparing Amplify and Gatsby Cloud. Getting a PR-for-PR comparison is a little tricky, since PRs are sometimes merged before both completed, but I was able to get a enough data to draw some initial conclusions:
| PR | AWS Amplify | Gatsby Cloud |
| - | - | - |
| #2338 | 4:10 | 13:20 |
| #2326 | 58:47 | 36:24 |
| #2320 | Failed | 39:30 |
| #2277 | 58:46 | 40:47 |
| #2335 | 5:42 | 23:51 |
| #2260 | ??:?? | 11:59 |
_Assessment_: For this set of PRs, Gatsby Cloud doesn't seem to be significantly better. We can continue to compare builds as PRs come in. Anecdotally, it seems like Gatsby builds come in about 10 - 20 minutes earlier, but those results are varied.
The run page queries step (compiling all the data to display for each page) is the slowest part of any build. Here's the breakdown for some of those PRs:
| PR | AWS Amplify | Gatsby Cloud |
| - | - | - |
| #2326 | 2158.588s (~36min) | 1513.17s (~25min) |
| #2320 | 2307.101s (~38min) | 1654.34s (~28min) |
| #2277 | 2062.123s (~34min) | 1672.67s (~28min) |
| #2260 | 2351.070s (~39min) | 443.92s (~7min) |
_Assessment_: Gatsby is faster at our slowest step in the build process. It's not a massive improvement, but Gatsby Cloud consistently outperforms.
Most helpful comment
I took a shot at comparing Amplify and Gatsby Cloud. Getting a PR-for-PR comparison is a little tricky, since PRs are sometimes merged before both completed, but I was able to get a enough data to draw some initial conclusions:
Overall Build Time
| PR | AWS Amplify | Gatsby Cloud |
| - | - | - |
| #2338 | 4:10 | 13:20 |
| #2326 | 58:47 | 36:24 |
| #2320 | Failed | 39:30 |
| #2277 | 58:46 | 40:47 |
| #2335 | 5:42 | 23:51 |
| #2260 | ??:?? | 11:59 |
_Assessment_: For this set of PRs, Gatsby Cloud doesn't seem to be significantly better. We can continue to compare builds as PRs come in. Anecdotally, it seems like Gatsby builds come in about 10 - 20 minutes earlier, but those results are varied.
Run Page Queries
The
run page queriesstep (compiling all the data to display for each page) is the slowest part of any build. Here's the breakdown for some of those PRs:| PR | AWS Amplify | Gatsby Cloud |
| - | - | - |
| #2326 | 2158.588s (~36min) | 1513.17s (~25min) |
| #2320 | 2307.101s (~38min) | 1654.34s (~28min) |
| #2277 | 2062.123s (~34min) | 1672.67s (~28min) |
| #2260 | 2351.070s (~39min) | 443.92s (~7min) |
_Assessment_: Gatsby is faster at our slowest step in the build process. It's not a massive improvement, but Gatsby Cloud consistently outperforms.