Tips and Best-Practices

This section describes some tips, best practices and recommendations that will assist in installing, configuring, maintaining and scaling your K2 environment.

Area Tip/Practice Notes
Network Always install as a Farm with a hostname defined in DNS. Even if you are only installing a single K2 server, it is recommended to create a DNS hostname (e.g. K2Dev, K2Test, K2) for each environment, and then install K2 using the Farm install option. This approach allows you to scale-out more easily in future, since you can use NLB to add additional physical machines to the DNS hostname and not have to re-configure various parts of K2 to point to a different server name.
SQL Database Always install with a SQL alias Installing K2 against a SQL alias will make it easier to move the K2 SQL database to other SQL instances or hardware in future, should it be required.
Set SQL collation to one of the following:
  • SQL_Latin1_General_CP1_CI_AS
  • Latin1_General_CI_AS

One of these collations is required on the SQL server instance. Since this is a SQL instance-level setting that is a little complicated to change after any databases are installed on that instance, K2 recommends you set the SQL collection for the target SQL instance from the start, before installing K2 in that instance. If the target SQL instance is not running the correct SQL collation, and there are already other databases in that instance, K2 recommends you create a new SQL instance with the correct collation setting and install the K2 databases on the new instance.
K2 Application server Add an entry to the hosts file to keep communication local To improve performance, you should define a host file entry on the K2 application server that will point network communication to K2 on that machine, back to the same machine. See the K2 Knowledge Base article Modifying the hosts file to improve performance for more information.
Disable the generatePublisherEvidence security check in the machine.config file. Disable publisher verification for the K2 application servers by modifying the Machine.config on the relevant servers to set the generatePublisherEvidence enabled setting to false.
IIS Use SSL SSL is preferred, and do not enable non-SSL if you need to have SSL on your K2 web site components.
Install with a full DNS name on IIS Always install the K2 web components with a full DNS name on IIS.
Service Accounts Use separate service accounts for different environments You should define separate service domain accounts for each environment, for example K2ServiceDev, K2ServiceTest, K2ServiceProd. This will allow more fine-grained control over permissions and security, and can help to prevent applications in your Development environment from updating data in your production environment, for example.