[toc]
This article describes how to configure and create a webfarm environment for Telligent Community.
Webfarm environments
A webfarm, or web server cluster, consists of two or more physical servers acting together as if they were one server to host one or more websites. Technologies such as distributed file system (DFS) have come a long way to make deploying, configuring and managing Windows-based webfarms much easier.
There are many physical and logical configurations that can be used to create a load-balanced webfarm environment. They can use everything from load-balancing hardware such as F5 to file replication software such as Robocopy. In this section, we will take a quick look at the technologies providing the quickest and easiest route to Windows-based load balancing in a webfarm environment.
If you are already familiar with webfarm environments and the necessary technologies, then you can skip to Synchronize files across nodes to read Telligent Community platform-specific portions.
Server operating system and web server
We recommend that customers who want to create a webfarm environment for hosting Telligent Community use IIS 8.0 on Windows Server 2012.
Load-balancing in a Windows-based webfarm
Load-balancing is the process of taking many requests and distributing them equally to any number of web servers that are acting as one. While network load-balancing (NLB) is a built-in capability of Windows, we recommend hardware-based load-balancing. Hardware-based solutions use dedicated network hardware to manage the traffic distribution.
An NLB solution should support Direct Server Return (DSR) to ensure maximum scalability. DSR ensures that the web nodes can communicate directly with the client nodes. The NLB settings for DSR vary, and you should consult your solution's documentation.
Shared configuration: Synchronize or duplicate configuration settings across nodes
Managing a webfarm can be difficult when it comes to ensuring that all servers stay synchronized. The integrity of the webfarm depends on the concept that all of the servers are virtually identical in their configuration. This unity is required because it only takes one web server misstep to cause the entire webfarm to malfunction. It can be very difficult to troubleshoot webfarm issues when the machines vary in configuration.
IIS8 has shared configuration functionality built into it that you can use for configuring your webfarm.
Synchronize files across nodes
There are a number of Telligent Community configurations that require files created by the web server to be copied or synchronized across all of the web server nodes in the webfarm. Here are two example configurations or services that require some form of synchronization across the servers:
- Search
- Blog directories: When new blogs are created the directories need to be created on each node
Ideally, all nodes should contain identical files with the exception of configuration files. Windows Server 2012 provides a feature called DFS. We highly encourage those using Telligent Community in a webfarm environment to use DFS for keeping file systems synchronized.
DFS requires Active Directory to function. There should be at least two controllers to ensure DFS functions reliably. Additionally, Active Directory should be at the highest level of functionality possible. .
Common webfarm configuration
In a web farm configuration that supports 3M page views per day, there should only be one database server. In larger scale solutions, or when redundancy is critical, it is possible to run clustered SQL servers. The application servers in both the web and search/tasks layers should run standard operating system/web server components that meet Telligent Community's recommended requirements. These servers should also have all of the Community Server application files, which include everything you would find in the web folder of the upgrade or web installation packages. The default search provider, Solr, should run on a dedicated server with the search indexing tasks hosted by Telligent Job Service.
Telligent Community software configuration
There are a number of Telligent platform-specific configuration issues that people commonly run into:
- How should I store user contributed media (files added to the Media Gallery or otherwise attached to posts)?
- Do I need to do anything with the authentication, authorization, roles or profile settings?
- Do I need to install Telligent Community on the Solr server?
- Do I need to install Solr on all web servers in the webfarm?
- Do I need to enable the search indexing tasks on all web servers in the webfarm?
How should I store user-contributed media?
You should make any changes referenced in this section before you upgrade your Telligent Community site.
Telligent Community makes use of a Centralized File Storage (CFS) provider. CFS provides a great deal of flexibility to the[ [http://telligent.com/community/developers/w/developer8/|developer]] or system administrator because it is relatively straightforward to configure Telligent Community to use any number of external file storage systems (Amazon's S3, UNC path, etc.). Telligent Community supports the concept of an overriding configuration file so rather than changing the default install, you can create an override file - communityserver_override.config.
Here is an example that overrides the CFS to use a UNC path:
<Override
xpath="/CommunityServer/CentralizedFileStorage/fileStore[@name='CommunityServer.Components.PostAttachments']"
mode="change"
name="basePath"
value="\\CSFiles">
</Override>
The value for the xpath element should be on one line. Also, to properly override CFS, you would need to provide an override value for all of the CFS entries (of which the above is one example).
In this configuration, at least one node is accessing a resource (files) on another system (the one that hosts the UNC share).
The security implications of cross-machine resource requests can be complicated. You can configure security parameters for your application a number of ways, and each operating system uses a different account to run the ASP.NET process. There is a great matrix that shows you the various security contexts in which your resource request will leave the server.
Because many of these options are environment-specific, we encourage you to read about the various configurations that allow for impersonation and delegation in Telligent Community or any ASP.NET application. If you are switching from local file share to remote file share, you need to move all of the files and folders to the remote file share. You also need to review the file permissions once they are moved to the remote file share to ensure they are still accessible. Understanding how the underlying ASP.NET security model works is critical to understanding how you must configure remote network file requests from within your application.
In the event centralized storage is undesirable, local storage on the web nodes can be used. Available storage should be monitored closely. DFS can maintain file synchronization and should be monitored closely to ensure its health. To minimize the complexity of maintaining your community's web nodes, the best practice is to ensure the local paths are identical across all nodes.
Do I need to do anything with the authentication, authorization, roles or profile settings?
There are two keys to keeping authentication, authorization, roles, and profile settings working correctly in a webfarm environment:
-
Cookie names: Ensure that cookie names set in the web.config file are the same on each node in the webfarm.
-
Machine keys: Ensure that the validationKey and decryptionKey values are the same on all nodes in the webfarm.
Do I need to install Telligent Community on the Solr server?
No. Solr runs independently from Telligent Community.
Do I need to install Solr on all web servers in the webfarm?
No. Solr only needs to be installed on one server. You can run Solr on a dedicated Telligent Community server. For Solr, if you have a large number of documents (> 1M documents), you should consider allocating a larger amount of RAM (2GB+) to Solr.
All web servers in the webfarm should be configured to point to the Solr instance. Edit the host attribute for the the Solr element of the communityserver.config file for all web servers. Example:
<Solr host="http://[yourSolrHost]:8080/solr" simpleSearchQueryType="dismax"
enableFieldCollapsing="true" enableHighlighting="true">
The Solr instance should not be accessible by the public and ideally, would only be accessible by your web servers (and administrators as necessary).
Do I need to enable the search indexing tasks on all web servers in the webfarm?
No. Indexing should be done in one of two ways:
-
Select one web server to run the indexing tasks. The SearchDeleteQueue and SearchIndex tasks should be enabled on this server and removed from all other web servers.
- Run indexing using the indexing plugin.