Performance

Overview

Sitefinity Cloud utilizes the following capabilities:

  • Page precompilation
  • Distributed output cache
  • Output cache warmup
  • CDN for the whole website
  • Application warmup
  • Auto-scaling
  • External Blob storage
  • Automated database performance optimization

Page precompilation

Precompilation of pages is a standard feature of ASP.NET that has the following advantages:

  • Helps pages load faster when requested for the first time
  • Reduces processor load
  • Skips the warm-up phase when a site is deployed

While Sitefinity CMS offers a precompiler tool that enables customers to precompile the pages of their website, Sitefinity Cloud, seamlessly integrates the precompiler tool into the deployment process. This process ensures that when a new package is deployed to production, the pages of your website are always precompiled. Depending on the complexity of your website, this performance improvement alone can reduce the time it takes to load a page for the first time from seconds to milliseconds.

Output cache

The output cache configuration in Sitefinity Cloud has two features that improve website performance.

Distributed output cache

Azure Cache for Redis is used to share the same output cache across all website instances. This improves the performance after deployment, scale-out, and unplanned restarts, because instances that do not have to build up the output cache on their own. For example, a new website instance, which has been added after scale-out, can instantly start returning a cached response for a given page.

Output cache warmup

The output cache warmup is a powerful Sitefinity CMS feature that is configured with each Sitefinity Cloud setup. When content editors make changes to content items that are displayed on one or more pages, the output cache for those pages is invalidated. This is done to ensure that the latest content is displayed to end-users. The downside is that the first request for these pages is relatively slow, until the pages are cached again. Output cache warmup overcomes this slowdown. When using output cache, the website will request itself and cache the new version of the pages. This is done in the background and the performance of the first page request is hidden from end-users - the old version of the page is displayed to end-users, until the new version is cached. After the new version is cached, it is instantly displayed to the end-users, without decrease in performance.

For illustration of this process, see the diagram at the end of the article. 

CDN

In Sitefinity Cloud, every request goes through a CDN, which then selectively caches the responses depending on the cache headers from the server. This includes the HTML markup of page requests. Caching pages on the CDN level can drastically boost website performance, not only in terms of speed, but also in terms of handling large load. This is achieved through the large global edge network covering all parts of the world. An additional coverage in China mainland can be obtained by purchasing the Sitefinity Cloud China CDN add-on.

The following chart illustrates the performance difference for serving a page through CDN:

Without CDN With CDN
A-B-testing CDN

Personalization and A/B testing

Sitefinity Cloud supports complex cases using CDN, such as A/B testing. Sitefinity Cloud automatically detects whether a page needs to be cached or not and provides the necessary cache-control header values to inform the CDN what to do. For example, pages that have active A/B tests will not be cached on the CDN. Pages that have fully personalized versions for the whole page will also be excluded from the CDN cache. Pages that have personalization per widget will have CDN cache, because the changes are applied client-side after the page is rendered.

Application warmup

The warmup mechanism sends to the application a set of requests, which generates different levels of application cache that the application uses, before it starts serving actual traffic.
Sitefinity Cloud uses the standard IIS warmup feature.
During deployment, the CD pipeline gets the top 50 most viewed pages from the Application Insights and includes them in the <applicationInitialization> section of the web.config.
For more information, see Application warmup.

Auto-scaling

With load balancing and auto-scaling, Sitefinity Cloud intelligently distributes website visitors to the available web server nodes and scales-out the number of nodes to accommodate traffic.

External Blob storage

Blob storage has the advantage of better scalability. When your Sitefinity Cloud database becomes too big, handling and restoring it may become time consuming. In this case, it is best to use external Blob storage for your media files.
Sitefinity Cloud uses Azure Blob storage provider, which is an implementation of a cloud blob storage provider - it stores the binary blob data of Sitefinity Cloud library items on Azure storage.
For more information, see Blob storage.

Automated database performance optimization

Database indexes are automatically rebuilt every 24 hours, depending on their fragmentation, for each environment.

Cache invalidation workflow

In a classic setup, when using CDN, the CDN cache is refreshed only after the TTL expires. This does not allow for long CDN cache durations, because website content can quickly become stale. In Sitefinity Cloud, to solve this problem, there is the following workflow configured:

  1. Output cache warm-up is triggered when a page or one of its dependencies is changed in the Sitefinity CMS (published, unpublished or deleted). Old version of the page is served to website visitors while warm-up is in progress.
  2. Output cache version of the page is updated or invalidated after which IOutputCacheInvalidationEvent event is fired.
  3. Service hook is triggered for the IOutputCacheInvalidationEvent event.
  4. CDN Purger function processes the service hook request payload and sends a CDN cache purge request.
  5. A request is sent to the CDN for the updated page.
  6. CDN sends a request to the Sitefinity Application to retrieve the page, instead of serving it from cache.

The following diagram illustrates this process:

Cache invalidation workflow

Was this article helpful?