Sitecore Horizon is a modern way to visually edit Sitecore websites. Paired with Next.js and Vercel, it provides great editing experience.
But how does it actually work and what are the potential bottlenecks?
In a typical setup (without Next.js / Vercel), the data flow is pretty simple:
Rendering happens on Sitecore CM role, and Horizon provides UI tools for managing renderings. However, with Next.js / Vercel, Sitecore CM role no longer needs the frontend app source code and is not responsible for rendering. Instead, Vercel-based site is responsible for rendering.
Let's explore the following two topics:
- Will it scale (vertically)?
- Where is it actually hosted?
The short answer to the first one - yes, but the scale is limited to 3x times the default performance. Why? Serverless Functions are allocated CPU power according to the amount of memory configured for them. For example, with 1,792MB memory configured, a Serverless Function will have the equivalent of one vCPU.
By default, rendering function has 1,024MB assigned:
It is important to deploy the functions as close to the CM instance as possible. If your CM instance is located in, let's say, Australia, and the functions are in default location, you can expect up to a second extra delay when clicking through the pages in Horizon.
To change the region, simply add the following contents to the vercel.json file located in the website root folder:
No comments:
Post a Comment