Skip to content

Commit 3d371b9

Browse files
Improve documentation around Windows failover cluster and MSMQ (#7881)
* Improve documentation around Windows failover cluster and MSMQ This PR improves the documentation on how to set up ServiceControl when using Windows failover cluster and MSMQ * Add link to the cluster configuration from the transport settings * Add details around MSMQ and clustering to the ThroughputDataQueue setting * Update review date * Add missing slash * Update deploying-servicecontrol-in-a-cluster.md * Adding Brandon's findings * Another pass * Another pass * Update configuration.md * Update transports.md * Revisions and other fixes --------- Co-authored-by: Brandon Ording <[email protected]>
1 parent 0c0cf0f commit 3d371b9

File tree

6 files changed

+38
-72
lines changed

6 files changed

+38
-72
lines changed

servicecontrol/configure-non-privileged-service-account.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ Both read and send permissions are required for each of these queues:
2525

2626
* `{InstanceName}`:
2727
* `{InstanceName}.errors`
28-
* `{InstanceName}.timeouts` (only when using [MSMQ](/servicecontrol/transports.md#msmq))
29-
* `{InstanceName}.timeoutsdispatcher` (only when using [MSMQ](/servicecontrol/transports.md#msmq))
3028

3129
### [Error instances](/servicecontrol/servicecontrol-instances/):
3230

servicecontrol/deploying-servicecontrol-in-a-cluster.md

Lines changed: 26 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,48 @@ title: Deploying ServiceControl to a Cluster
33
summary: A guide to deploying ServiceControl on a Windows failover cluster
44
related:
55
- servicecontrol/troubleshooting
6-
reviewed: 2024-11-01
6+
reviewed: 2025-10-22
77
---
88

9-
> [!NOTE]
10-
> ServiceControl only supports active/passive clusters. Clustering might not be required as cloud hosting and enterprise virtualization layers provide high availability and data redundancy features and message queueing ensures no messages are lost.
11-
129
The following procedure is a high-level guide on how to deploy ServiceControl onto a fault-tolerant cluster using Windows Failover Clustering.
1310

1411
> [!NOTE]
1512
> This guide assumes that MSMQ is the underlying transport. Other transports work as long as these are deployed on a different machine. In that case, skip the MSMQ-specific steps.
1613
17-
## Basic setup
18-
19-
* Set up a failover (active/passive) Windows cluster:
20-
* [Windows Server 2008](https://blogs.msdn.microsoft.com/clustering/2008/01/18/creating-a-cluster-in-windows-server-2008/)
21-
* [Windows Server 2012 R2, Windows Server 2012, Windows Server 2016](https://docs.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster)
22-
* Install ServiceControl on each node, adding it as a "generic service" using the cluster manager. This means that ServiceControl will failover automatically with the cluster.
23-
* Set up an MSMQ cluster group. A cluster group is a group of resources that have a unique DNS name and can be addressed externally like a computer.
24-
* Add the ServiceControl generic clustered service to the MSMQ cluster group:
25-
* Ensure it depends on MSMQ and the MSMQ network name
26-
* Check "use network name as computer name" in the service configuration
27-
28-
Once set up, the ServiceControl queues will be available on the cluster. The server name will be the MSMQ network name, not to be confused with the cluster name.
29-
30-
More information is available on [Message Queuing in Server Clusters](https://technet.microsoft.com/en-us/library/cc753575.aspx).
31-
32-
## Database high availability
14+
> [!NOTE]
15+
> ServiceControl only supports active/passive clusters.
3316
34-
The RavenDB database must be located in *shared storage* that is highly available and fault tolerant. Shared storage does not mean a network share but shared cluster storage that allows low latency and exclusive access. Access to the data should always be 'local', although physically that data could be stored on a SAN. When this disk is mounted, RavenDB must be configured to use that location. See [Customize RavenDB Embedded Location](configure-ravendb-location.md) for more information on how to change the ServiceControl database location.
17+
## Infrastructure setup
3518

36-
## ServiceControl detailed configuration
19+
1. Create a [Windows Failover Cluster](https://learn.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster?pivots=failover-cluster-manager),
20+
1. Create a [Message Queuing role on the cluster](https://learn.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster?pivots=failover-cluster-manager#create-clustered-roles-in-failover-cluster-manager)
21+
1. Install ServiceControl on each node of the cluster.
22+
1. Add the ServiceControl Windows Service as a Generic Service resource to the MSMQ cluster role.
23+
1. Ensure it depends on the MSMQ role and the MSMQ network name
24+
1. After setting up the dependencies, check the "Use Network Name as computer name" option
3725

38-
Once the failover cluster is created and ServiceControl is installed, configure ServiceControl to run in a clustered environment.
26+
Before bringing the service resource online, all of the [required queues](/servicecontrol/queues.md#queue-setup) must be created and given the appropriate permissions manually in the cluster.
3927

40-
> [!NOTE]
41-
> The following steps must be applied to all ServiceControl installations on every node in the cluster.
28+
### Database high availability
4229

43-
### URL ACL(s)
30+
The internal ServiceControl RavenDB database must be located in a shared storage that is highly available and fault tolerant. Shared storage does not mean a network share, but a cluster storage that allows low latency and exclusive access.
31+
Access to the data should always be local, although physically that data could be stored on a SAN. When this disk is mounted, ServiceControl must be configured to use that location.
4432

45-
ServiceControl exposes an HTTP API that is used by ServicePulse and ServiceInsight. URL ACL(s) must be [defined on each cluster node](/servicecontrol/setting-custom-hostname.md). The URL must be set to the `cluster name` and the ACL set to give permissions to the `Service Account` running ServiceControl.
33+
## ServiceControl configuration
4634

47-
> [!NOTE]
48-
> The default installation of ServiceControl locks down access to `localhost` only. Once the URL ACL is changed from `localhost` to the `cluster name` ServiceControl is accessible from the network.
35+
The following settings must be applied to all ServiceControl instances on every node in the cluster.
4936

5037
### Configuration
5138

52-
ServiceControl configuration must be customized by changing the following settings:
53-
54-
* `DbPath` to define the path to the shared location where the database will be stored
55-
* `Hostname` and `port` to reflect `cluster name` and `port`
56-
* `audit` and `error` queues to include the `cluster name`;
57-
58-
The following is a sample ServiceControl configuration file (ServiceControl.exe.config):
39+
The ServiceControl configuration must be customized by changing the following settings:
5940

60-
```xml
61-
<configuration>
62-
<appSettings>
63-
<add key="ServiceControl/DbPath"
64-
value="drive:\SomeDir\" />
65-
<add key="ServiceControl/Hostname"
66-
value="clusterName" />
67-
<add key="ServiceControl/Port"
68-
value="33333" />
69-
<add key="ServiceBus/AuditQueue"
70-
value="audit@clusterName" />
71-
<add key="ServiceBus/ErrorQueue"
72-
value="error@clusterName" />
73-
<add key="ServiceBus/ErrorLogQueue"
74-
value="error.log@clusterName" />
75-
<add key="ServiceBus/AuditLogQueue"
76-
value="audit.log@clusterName" />
77-
</appSettings>
78-
</configuration>
79-
```
41+
- The database path needs to set to the path to the shared location of the database.
42+
- `ServiceControl/DBPath` for error instances
43+
- `ServiceControl.Audit/DBPath` for audit instances
44+
- The host name needs to be set to the MSMQ network name
45+
- `ServiceControl/HostName` for error instances
46+
- `ServiceControl.Audit/HostName` for audit instances
47+
- `Monitoring/HttpHostName` for monitoring instances
48+
- The `ServiceControl/RemoteInstances` setting should use the MSMQ network name to refer to the audit instance
8049

81-
See [Customizing ServiceControl Configuration](/servicecontrol/servicecontrol-instances/configuration.md) for more information.
50+
See [Customizing ServiceControl Configuration](/servicecontrol/servicecontrol-instances/configuration.md) for more information on each setting.

servicecontrol/queues.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ The following is an overview of all queues based on the default instance names.
3838
| [particular.monitoring](#monitoring-instance-input-queue) | | | CR |Receives heartbeats, checks |
3939
| [particular.servicecontrol](#error-instance-input-queue) | CR | W | |Input queue for error/heartbeat |
4040
| [particular.servicecontrol.audit](#audit-instance-input-queue) | CR | W | |Input queue for audit instance |
41-
| [particular.servicecontrol.error](#error-instance-error-queue) | CW | | |Internal error queue |
42-
| [particular.servicecontrol.audit.error](#audit-instance-error-queue) | CW | | |Internal error queue for audit |
41+
| [particular.servicecontrol.errors](#error-instance-error-queue) | CW | | |Internal error queue |
42+
| [particular.servicecontrol.audit.errors](#audit-instance-error-queue) | CW | | |Internal error queue for audit |
4343
| [particular.servicecontrol.staging](#error-instance-staging-queue) | CRW | | |Temporary queue for retries |
4444
| [servicecontrol.throughputdata](#error-instance-throughput-data) | CR | | W |Tracks metrics / throughput |
4545

servicecontrol/servicecontrol-instances/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Error Instance Configuration Settings
33
summary: Categorized list of ServiceControl Error instance configuration settings.
44
component: ServiceControl
5-
reviewed: 2024-06-24
5+
reviewed: 2025-10-22
66
redirects:
77
- servicecontrol/creating-config-file
88
---
@@ -137,6 +137,7 @@ The maximum allowed time for the process to complete the shutdown.
137137
| **SCMU field** | N/A |
138138

139139
| Environment/Installation type | Type | Default value |
140+
|---|---|---|
140141
| Containers | TimeSpan | `00:00:05` (5 seconds) |
141142
| Installation via PowerShell (on Windows) | TimeSpan | `00:02:00` (2 minutes) |
142143
| Installation via ServiceControl Management Utility (SCMU) (on Windows) | TimeSpan | `00:02:00` (2 minutes) |
@@ -525,7 +526,7 @@ The queue on which throughput data is received by the ServiceControl Error insta
525526

526527
In most instances these settings do not need to be modified.
527528

528-
If running multiple setups of the Platform Tools (i.e. multiple versions of ServiceControl error and monitoring instances) then modify these settings so that the queue on each monitoring instance is matched to the queue of its error instance.
529+
If running multiple setups of the Platform Tools (i.e. multiple versions of ServiceControl error and monitoring instances), then modify these settings so that the queue on each monitoring instance is matched to the queue of its error instance.
529530

530531
If using [MSMQ transport](/transports/msmq) and the monitoring instance is installed on a different machine than the ServiceControl error instance, only the monitoring instance setting needs to be modified to include the machine name of the error instance in the queue address.
531532

servicecontrol/transports.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Transport configuration
33
summary: ServiceControl can be configured to use one of the supported message transports which are configured for each instance type
4-
reviewed: 2024-07-19
4+
reviewed: 2025-10-22
55
component: ServiceControl
66
---
77

@@ -23,7 +23,6 @@ The value for the `TransportType` settings can be any of the following:
2323
| [PostgreSQL](#postgresql) | `PostgreSQL` |
2424
| [Microsoft Message Queuing (MSMQ)](#msmq) | `MSMQ` |
2525

26-
Follow the link for each transport for additional information on configuration options for that transport lower on this page.
2726

2827
## Azure Service Bus
2928

@@ -166,8 +165,8 @@ Region=<REGION>;QueueNamePrefix=<prefix>;TopicNamePrefix=<prefix>;AccessKeyId=<A
166165

167166
To configure MSMQ as the transport, ensure the MSMQ service has been installed and configured as outlined in [MSMQ configuration](/transports/msmq/#msmq-configuration).
168167

169-
> [!IMPORTANT]
170-
> When [ServiceControl instances are installed on a different machine than an endpoint](/transports/msmq/routing.md#when-servicecontrol-is-installed-on-a-different-server) `queuename@machinename` addresses must be used.
171-
172168
> [!NOTE]
169+
> Any settings that specify a queue name for a queue that is not located on the same machine as the ServiceControl instance must use `queuename@machinename` addresses to refer to that queue.
170+
171+
> [!WARNING]
173172
> MSMQ transport is not available when running ServiceControl on containers.

transports/msmq/routing_content_msmqtransport_[1,).partial.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ snippet: InstanceMappingFile-FilePath
5151

5252
Specifies a URI path of the instance mapping file. Relative paths are assumed to be file paths.
5353

54-
5554
snippet: InstanceMappingFile-UriPath
5655

57-
## When ServiceControl is installed on a different server
56+
## Queues that are not configured with the instance mapping file
5857

59-
The [instance mapping file](#instance-mapping-file) will have no effect on the error, audit, metrics, and plugin queues, so if a ServiceControl instance is installed on a different machine than the endpoint the physical mapping must be specified during configuration using `queuename@machinename` addresses:
58+
The [instance mapping file](#instance-mapping-file) will have no effect on the error, audit, metrics, or plugin queues. If those queues are located on a different machine, then the physical mapping must be specified during configuration using `queuename@machinename` addresses:
6059

6160
### Configuring recoverability
6261

@@ -80,6 +79,6 @@ snippet: ConfigureCustomChecksRemoteQueue
8079

8180
## Overriding physical routing
8281

83-
When [overriding the default routing](/nservicebus/messaging/send-a-message.md#overriding-the-default-routing) to a queue on a different server the machine name must also be provided:
82+
When [overriding the default routing](/nservicebus/messaging/send-a-message.md#overriding-the-default-routing) to a queue on a different server, the machine name must also be provided:
8483

8584
snippet: OverridingPhysicalRouting

0 commit comments

Comments
 (0)