Core Docs - Supporting Rock - Configure a Rock Web Farm
Rock Version: v19.0
Last Modified: 2025-11-18 3:12 PM
Before getting started you’ll want to complete the following pre-steps:
With these steps complete, you’re now ready to configure the web farm. Below are the steps you’ll need to follow.
1. Configure the Message Bus
If you haven’t yet configured a message bus in Rock, you’ll need to do that before proceeding. See the Message Bus section below for more information on configuring the message bus.
2. Activate the Web Farm
Navigate to Admin Tools > System Settings > Web Farm to enable the web farm feature. This is where you will activate the web farm and enter your unique license key.
The remaining settings can be left as is. The additional configuration values are discussed below in the section on how nodes elect leaders.
3. Restart All Web Nodes
Once the configuration is set, you ’ll need to restart all the nodes in the farm. Once restarted, the web farm is fully configured. You’ll want to ensure that each node is displayed on the Web Farm page.
The Secret Life of Web Farm Nodes
Behind the scenes, the nodes of a web farm communicate with each other over the message bus to keep each other in the loop on what’s happening inside the cluster. These messages are related to two primary types:
Node Start-up / Shutdown
As nodes start-up, they report their status to the web farm log and mark their status as active. They also report when they shut down and change their status to inactive. This notifies the leader which nodes are expected to be running.
Leader Responsibilities
As noted above, one of the responsibilities of the node leader is to check the status of every node marked as being active. This status check is run on a configured polling schedule. On each run, the leader sends every active node a ping. If a node does not respond within a few seconds with a pong response, the leader reports the node as having been marked active but no longer responding.
Leader Election
You may be wondering how a leader is elected by the cluster. The election process is a sophisticated algorithm that allows the nodes to jointly elect a leader as well as trigger a re-election event, should the leader go AWOL. Let’s take a closer look at how the election process works.
As a node starts-up, it randomly selects a polling interval to use. The selection of the random interval is guided by the configuration of the web farm. The configuration settings tell the node the minimum and maximum interval value. Using these values as boundaries, the node randomly selects a value somewhere between. It then checks the database to see if another node already has a similar interval (what constitutes a similar interval is also configurable). If a node is found with a similar interval it tries another random interval until an acceptable value is generated. This interval is then stored in the database for that specific node.
The leader of the cluster is the node with the smallest interval, meaning it will be the first to send out a request to other nodes for a status check. As each other node receives a status check request, it also notes that it has been contacted by the leader and therefore should reset its timer to ping other nodes. If the leader goes offline, the node with the next lowest interval will reach its status check interval and assume the leadership role. These changes of leadership are noted in the web farm log.
When a leader node comes back online, their smaller interval length will kick back in, and it will regain leadership within a status cycle or two.
The current leader of a cluster is noted by a small icon in the upper right of the node card.
Leader Node
In the above scenario, the leader node is randomly selected. If you prefer, you can specify a particular node as leader by setting the interval value on the node’s WebFarmNode record in the database. Setting the ConfiguredLeadershipPollingIntervalSeconds property disables the random value, which currently must be updated in SQL. Placing a value lower than the minimum will ensure that the node is always the leader when running. If that node goes offline, another node will still step in until it comes back online.
Node Names
By default, the name of the node will be read from the service's machine name. If you prefer to use a different name, you can provide it in the web.config file with the app setting key of “NodeName”.
Node Metrics
You’ll notice that basic CPU metrics are provided for each node in the cluster. This provides a quick way to confirm that the load is being roughly balanced across your nodes. If you find that these charts vary greatly across your nodes, it may mean that something is not correctly configured in your application gateway.
Current Limitations
Rock’s Web Farm features will continue to grow as more time and resources become available to fund resources. Below is a list of known limitations.
Message Bus
Larger organizations may have more than one Rock server. A Web Farm allows multiple servers to talk to each other. They talk to each other over what's known as a Message Bus. The Message Bus can talk to external systems in a two-way conversation. This gets complex and you'll need a developer to set that up, but it unlocks a lot of capabilities within Rock.
Two bus services are currently supported by Rock. They are:
To set up the Message Bus, navigate to the Message Bus page under System Settings and click the Configure Transports button. Then click on the transport you want to use, make it active and provide the needed details from either the Azure Service Bus server or the Rabbit MQ server. Ensure only one transport is active by inactivating any you're not using.