Skip to main content
There is a newer version of Contensis. Click to find out more and download the latest version.

Front-end webserver scaling

When you are planning to deploy a new site it is worth while considering your long term plans with the front-end webservers. This article will explain some of the limitations of different web server configurations, so you can be sure you will not hit any issues.

Memory usage

One of the main factors to consider, when implementing a front-end webserver is the memory usage that you may need. This is not a precise science, but can be provisioned with some educated guesses.

Compiled assemblies

Each page on your site will get compiled as a DLL by the Microsoft Framework automatically. Unfortunately IIS allocates memory in 64k chunks, so if the compiled assembly is 1k then it is going to use 64k of memory, this is unavoidable. If the assembly is 65k it will use 128k of memory. On average most Contensis pages will not use more than 64k of memory.

Cached page output

If you are using Asp.Net caching on your site (and if you are not you should be, check out Configuring Page Caching), then each of the pages rendered will use as much memory as the size of the rendered output of the page. 

In most scenarios VaryByBrowser and VaryByParam will be enabled, which effectively means that each page will be stored in the memory for as many different major versions of a browser visits, and for as many different querystring variations.

Most pages on a site, are not affected by VaryByParam, only for example news and events, which have multiple URL's on a single page.

For estimation purposes, we are going to suggest that with an average render size of 100k, there may be 4 variations stored in cache. This means that we will store 400k of cached data for each page for example. As we are still affected by the 64k addressing, this means that we will actually require 448k per page.

Bear in mind that to free memory on a server you could simply disable the caching, but the issue is that typically a site will be able to serve 100 times more requests per second with a cache. As an example 8 requests per second with no cache and 800 requests per second with a cache.

Navigation XML

At the heart of every Contensis site is the navigation XML file, typically on a 5000 page site this will occupy around 300Mb of memory usage. So roughly 64k per page.

Required memory

Based upon the above estimates for each page we will require 576k per page. Please see the table of results below for different page counts.

Estimated memory usage for different page counts
No. of pagesMemory usage
100 56.25 MB
1000 562.5 MB
5000 2.8 GB
10000 5.6 GB

The above examples are really worst case, and typically you can expect results similar to the real world scenarios listed below from some real customer implementations.

Real world memory usage
No. of pagesAverage worker process memory usage
61,500 5.5 GB
18,000 3.2 GB