Skip to content

Commit a68f0e6

Browse files
Additional tweaks to the host id changes (#8375)
* Further tweaks to the host-id documentation based on feedback * Originating header --------- Co-authored-by: Daniel Marbach <danielmarbach@users.noreply.github.com>
1 parent ff9b25c commit a68f0e6

3 files changed

Lines changed: 17 additions & 11 deletions

File tree

nservicebus/compliance/fips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: FIPS Compliance
33
summary: Describes NServiceBus compliance with FIPS
44
component: Core
55
versions: '[7,)'
6-
reviewed: 2026-05-08
6+
reviewed: 2026-06-26
77
---
88

99
The [Federal Information Processing Standards](https://en.wikipedia.org/wiki/Federal_Information_Processing_Standards) or FIPS are standards developed by the United States government for computer systems that set requirements for, among other things, cryptography.

nservicebus/compliance/fips_host-id-generation_core_[10,11).partial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## NServiceBus
22

3-
Starting in version 10.2, NServiceBus can use a non-cryptographic hash algorithm (XxHash128) to generate deterministic unique identifiers for endpoints, also known as host identifiers (HostIds). Because XxHash128 is not a cryptographic algorithm, FIPS policy enforcement does not block host identifier generation; the host ID workaround described below is no longer needed.
3+
Starting in version 10.2, NServiceBus can use a non-cryptographic hash algorithm (XxHash128) to generate deterministic unique identifiers for endpoints, also known as host identifiers (HostIds). Because XxHash128 is not a cryptographic algorithm, FIPS policy enforcement does not block host identifier generation for this code path; the host ID workaround described below is no longer needed.
44

55
To ensure the non-cryptographic hash is used in NServiceBus 10, set the following AppContext switch before endpoint startup:
66

@@ -23,6 +23,6 @@ Or via MSBuild in a project file:
2323
```
2424

2525
> [!WARNING]
26-
> Changing the host identifier algorithm changes the host ID that identifies an endpoint in ServicePulse and ServiceControl. Changes to the algorithm will cause existing known endpoints to appear inactive in the ServicePulse [heartbeats](/monitoring/heartbeats/in-servicepulse.md) and [monitoring](/monitoring/metrics/in-servicepulse.md) views while new instances (with the changed host identifiers) appear in their place. Stale instances should be [removed from the monitoring view](/monitoring/metrics/in-servicepulse.md#disconnected-endpoints-removing-disconnected-endpoints).
26+
> Changing the host identifier algorithm changes the host ID that identifies an endpoint in ServicePulse and ServiceControl. Changes to the algorithm will cause existing known endpoints to appear inactive in the ServicePulse [heartbeats](/monitoring/heartbeats/in-servicepulse.md) and [monitoring](/monitoring/metrics/in-servicepulse.md) views while new instances (with the changed host identifiers) appear in their place. The changed host identifier also affects any custom logging, audit processing, dashboards, or queries that use generated host identifier headers, such as `$.diagnostics.hostid` or `$.diagnostics.originating.hostid`. Stale instances should be [removed from the monitoring view](/monitoring/metrics/in-servicepulse.md#disconnected-endpoints-removing-disconnected-endpoints).
2727
>
28-
> See the [NServiceBus version 10 to 11 upgrade guide](/nservicebus/upgrades/10to11/#host-identifier-algorithm-change) for more information on migrating from MD5 to the XxHash128 hash algorithm.
28+
> See the [NServiceBus version 10 to 11 upgrade guide](/nservicebus/upgrades/10to11/#host-identifier-algorithm-change) for more information on migrating from MD5 to the XxHash128 hash algorithm.

nservicebus/upgrades/10to11/index.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Upgrade Version 10 to 11
33
summary: Instructions on how to upgrade NServiceBus from version 10 to version 11.
4-
reviewed: 2026-06-08
4+
reviewed: 2026-06-26
55
component: Core
66
isUpgradeGuide: true
77
upgradeGuideCoreVersions:
@@ -200,7 +200,7 @@ In version 11, the default algorithm for generating deterministic host identifie
200200

201201
### Rationale
202202

203-
This change provides a path for customers who require **FIPS-compliant** host identifiers (see [FIPS compliance](/nservicebus/compliance/fips.md)). The legacy MD5-based algorithm is not FIPS-compliant; by moving to the new `XxHash128` algorithm, the framework uses a compliant standard by default.
203+
This change avoids using MD5 for default host identifier generation, which prevents FIPS policy enforcement from blocking endpoint startup for this code path (see [FIPS compliance](/nservicebus/compliance/fips.md)). The legacy MD5-based algorithm is not appropriate for this non-cryptographic use case.
204204

205205
To ensure a predictable transition, this is designed as a multi-phase migration:
206206

@@ -212,17 +212,21 @@ To ensure a predictable transition, this is designed as a multi-phase migration:
212212
| >= 12.0 | XxHash128 Only | XxHash128 | - |
213213

214214

215-
In version 11, XxHash128 becomes the default. By making this an explicit switch rather than an automatic change, there is a clear "escape hatch" to preserve legacy host IDs if correlation with older monitoring data (such as ServicePulse) must be maintained during the transition.
215+
In version 11, XxHash128 becomes the default. The opt-out switch is intended as a temporary migration aid when operational dashboards, log queries, audit processing, or monitoring processes need more time to move from the legacy generated host identifiers to the new identifiers.
216216

217-
This approach allows the framework to move toward a compliant default while providing the necessary flexibility to manage existing integrations before the legacy algorithm is removed in version 12.
217+
This approach allows the framework to move away from MD5-based host identifier generation while providing flexibility to manage existing integrations before the legacy algorithm is removed in version 12.
218218

219219
### Impact
220220

221-
After upgrading, endpoints will receive new host identifiers. This causes endpoints to appear as new entries in ServicePulse, while the previous instances become stale and must be [removed from the monitoring view](/monitoring/metrics/in-servicepulse.md#disconnected-endpoints-removing-disconnected-endpoints).
221+
After upgrading, endpoints that rely on the default generated host identifier will receive new host identifiers. This causes endpoints to appear as new entries in ServicePulse, while the previous instances become stale and must be [removed from the monitoring view](/monitoring/metrics/in-servicepulse.md#disconnected-endpoints-removing-disconnected-endpoints).
222222

223-
### Preserving the legacy host identifier
223+
The changed host identifier also affects any custom logging, audit processing, dashboards, or queries that use generated host identifier headers, such as `$.diagnostics.hostid` or `$.diagnostics.originating.hostid`. Endpoint names, queues, message processing, and explicitly configured host identifiers are not affected.
224224

225-
To preserve the existing MD5-based host identifier after upgrading, set the following AppContext switch before endpoint startup:
225+
ServiceControl stores and displays the resulting host identifier value. It does not know whether two different host identifiers were generated from the same endpoint path and machine name by different algorithms.
226+
227+
### Temporarily preserving the legacy generated host identifier
228+
229+
To temporarily preserve the existing MD5-based generated host identifier after upgrading to version 11, set the following AppContext switch before endpoint startup:
226230

227231
```csharp
228232
AppContext.SetSwitch("NServiceBus.Core.Hosting.UseV2DeterministicGuid", false);
@@ -244,3 +248,5 @@ Or via MSBuild in the project file:
244248

245249
> [!NOTE]
246250
> The legacy MD5-based host identifier algorithm and the `UseV2DeterministicGuid` AppContext switch will be removed in version 12.
251+
252+
If an endpoint must keep a specific host identifier beyond version 11, configure the host identifier explicitly instead of relying on the legacy algorithm switch. For example, an endpoint can be configured with its existing host identifier to keep the value stable after the legacy algorithm is removed. See [Overriding the host identifier](/nservicebus/hosting/override-hostid.md).

0 commit comments

Comments
 (0)