Configuration of uniquely identified running instances on Azure App Service

Hi,

When endpoint is running on Azure App Service (web job), which one of these configurations would be recommended i.e. could the first one cause any problems to routing, monitoring or to any other tools?

  1. One “fixed” instance identity for one web site.
var webSiteName = Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME");

endpointConfiguration
	.UniquelyIdentifyRunningInstance()
	.UsingNames("endpointName", webSiteName);
  1. Multiple instance identities for one web site.
var webSiteName = Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME");
var instanceId = Environment.GetEnvironmentVariable("WEBSITE_INSTANCE_ID");
var displayName = $"{webSiteName}_{instanceId.Substring(0, 6)}";

endpointConfiguration
	.UniquelyIdentifyRunningInstance()
	.UsingNames(instanceId, webSiteName)
	.UsingCustomDisplayName(displayName);

Question is related to:

Kimmo:

Setting the display name using the WEBSITE_INSTANCE_ID will not have any affect on routing. However it will identify instances in monitoring / servicepulse. If you are sure you will never scale the website, then omitting the WEBSITE_INSTANCE_ID will not cause any problems, however in general I would recommend every customer running NServiceBus endpoints in a web job and using ServicePulse follow the second option and include the WEBSITE_INSTANCE_ID as many features in ServicePulse are designed to report on physical instances of the endpoint, not just the logical endpoint as a whole.