-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Description
Hey, I'm opening this issue to keep publicly tracking the conversation we have with a currently ongoing effort to evaluate a possible migration of the https://nodejs.org website toward Vercel infrastructure.
This consideration initially started because we're adopting Next.js (full SCG) with nodejs/nodejs.org#4991 and the fact that by adopting Vercel's infra, we would have a set of benefits.
It is essential to mention that if we decide not to use Vercel infra, we might still want to consider having our Next.js installation run with SSR (Server-Side Rendering) on our Infrastructure maintained by the @nodejs/build WG.
What is this proposal about, and why?
On why adopting Next.js SSR/ISR
- Incremental builds that allow us to quickly build on our production and staging infrastructure with seconds between each deployment
- Internationalisation features that increase our accessibility to an international audience. Such as automatic language detection and redirection (
Accept-Language
),hreflang
, and other features. - Built-in Middleware that is highly customizable and would allow us to offload some of the Rewriting Rules we use on NGINX that are harder to maintain (require special access to the server, more prone to error, require specialized knowledge on NGINX).
- This would allow us to have better i18n routing/redirection, better 404 redirection/routing
- This would allow us to ditch the
/pages/{twoLetter}
directory format of having one repeated page for each locale and adopt a similar design from https://github.com/nodejs/nodejs.dev, where we have a single file for a page and multiple files for content. (Example: here and here).
- Caching of Assets, Pages, and API requests.
- It would allow us to introduce some of the Microsites, such as the Google Calendar microsite, instead of using the default Google Calendar Share page
- It would allow us to introduce API requests to lazy-load/offload rendering of specific components that are performance hungry, like the Previous Releases page that loads a huge JSON on every request.
- Introduction of Search (with Elasticlunr or alternatives) with indexing, server-side processing, and caching. Which would allow us to search for content on the website. (Gatsby supports that on SCG, but with the caveats that the client does the processing "statically".
- And more features that Next.js support.
On why adopting Vercel infra
- Easier management of deployments and a more seamless experience for live previews, staging branches, rollback, metric management, load balancers, and better auditing of deployments
- Not a single point of failure, as it is not hosted on a single server
- No monetary costs
- Less requirement of dedicated knowledge of our current build system infrastructure and special access and unique understanding of our legacy systems
What is this proposal not about
- Only the rules/pages handled by the nodejs.org repository are what we're considering offloading to Vercel. This means only the NGINX rules that currently point to the statically generated files from the nodejs.org repository, as pointed out here
- In practical terms, a proxy (rewrite rule) would be added in place to forward the requests to the Vercel-hosted App (as a reverse proxy, forwarding also headers, query parameters, et cetera)
- All
dist
, downloads, releases,dist.json
, generated metadata, other subdirectories, and microsites will remain on our current Build Infrastructure with the same NGINX rules.
What was talked about so far
- We had initial discussions with Vercel's Staff
- Meetings were held off with the Website WG and some people from the TSC and Build WG together with some people of the TSC and together with the Foundation Staff (@joesepi, @richardlau, @Trott, and others)
- In-Slack communication has happened with several people from the Foundation, Vercel, and Node.js
- This issue was finally created to publicly "audit" that this whole proposal is happening
- I believe further talks with the Build WG, Release WG, and the TSC will be done, including more discussions with the Foundation.
Next Steps
To be documented
UlisesGascon, joesepi, tobiaslins and AugustinMauroy
Metadata
Metadata
Assignees
Labels
No labels