Hide menu Last updated: Apr 05 2017
Area: Episerver CMS Applies to versions: 10 and higher

Managing cloud licenses

Cloud-based licensing works a bit differently than licenses used in an on-premise installation. This topic describes how to manage cloud-based licenses for test and production environments in an optimized way, when running Episerver websites in the cloud. 

How it works

Episerver licenses are available from the Episerver license portal. As cloud-based environments could dynamically scale out and in again depending on traffic volume, the usage is based on number of running instances. 

There are two types of commercial licenses for Episerver:

  • Instance Bound ("cloud licenses") - for cloud environments. These are tied to the number of running instances, with the necessary flexibility to operate on Azure or Amazon commercial clouds.
  • Server Bound - for non-cloud environment. These are tied to the MAC or IP address of the physical or virtual server on which it runs.

An instance bound license can bee seen as an on-premise server license based on a floating number of instances. A cloud-based site will "call home" when activated to register its running web app instance. As for server bound licenses, there is a limit on the number of instances that can be run under a specific instance bound license. As Episerver is multi-tenant, a single running instance of CMS can host multiple websites. 

License setup and activation

In the following we will describe how to activate instance bound licenses to be used with environments running in Microsoft Azure. 

Note: If you are using Episerver DXC Service, this is not needed as the DXC Service has no instance validation and does not require manual activation.

Defining the URLs

In this simple scenario, we have an Episerver solution running in two environments, one for test and one for production. Here you can use the same instance bound license file for both environments. To avoid a license error, you need to define the same URL in both the test and production environment.

For each environment, go to the CMS admin view, and add the URL to be used.

Activating the license

For each environment, go to the CMS admin view, and activate the license on both the test and production environments. The running instances will be counted towards the total number of instances allowed by the license.

Optimizing license usage

In this section we explain how the instance counting works, and provide some practical guidelines for optimizing cloud-based licenses when used with Microsoft Azure.

Instance counting

Since the cloud license is a floating license, you can add/remove instances as needed for the traffic volume, as long as you do not exceed the total number of instances allowed by your license. 

The instance counting is connected to the Azure server name. When scaling out, it does not really matter how many web apps and deployment slots (see below) you have, since they share the same instances (servers). Only ensure that you are using an Azure App Service Plan that does not allow for more instances than the number of instances in your license.

Also note that if you use the same license in multiple Azure App Service Plans, for example to separate test and production environments, then the license has to support the combined number of instances.

Using deployment slots

This is an Azure feature to help avoid "cold starts" after deployment. Using this you can deploy a new version of your solution to a Web App staging slot, where the site is automatically warmed up. When completed, Azure will do the swap to the live environment. Episerver supports deployments slots both technically and from a license perspective.

Note: Be aware that if you use the same database (in production) for a staging slot, you could unintentionally upgrade the Episerver-database-version when deploying new code to it. The Episerver-database-version would then be out of sync with the Episerver-code-version running in production, causing an error in production.

Exceeding the instance limit

During a scale-up or a system upgrade, environments may temporarily be doubled, causing the instance limit to be exceeded. If this happens, you will see an information notification in the edit view of the site. The front-end part will still be functional, and the operation of the site will not be interrupted. The message disappears when the number of running instances reach an approved level. The message is also displayed if the communication to the Episerver back-end is lost.

Switching between production and developer licenses

When updating your developer environment and doing a database restore on a production database, you may receive a notification stating that you do not have an active license. This is most likely due to the production database being activated on a production license, whereas you are using a developer license in your development environment. The solution is to manually reactivate the license.