Skip to content
Documentation
Updated 13 minutes to read
Markdown

Configure Azure Service Bus Relaying: Breaking Through Network Boundaries

Section titled “ Configure Azure Service Bus Relaying: Breaking Through Network Boundaries”

Modern integration architectures span multiple networks—on-premise data centers, Azure cloud environments, partner systems, customer sites, and DMZ networks. How do you monitor BizTalk servers behind strict corporate firewalls, cloud-hosted applications in customer Azure subscriptions, or legacy systems at remote manufacturing sites?

Where Traditional Monitoring Hits Hard Limits

Section titled “Where Traditional Monitoring Hits Hard Limits”
  • Firewall Restrictions Everywhere - Corporate security policies block inbound connections, making centralized monitoring impossible without complex VPN configurations and firewall rule changes
  • VPN Complexity and Cost - Site-to-site VPNs require network engineering expertise, expensive hardware, ongoing maintenance, and create single points of failure
  • DMZ and Perimeter Networks - Systems in isolated security zones cannot be reached by central monitoring infrastructure without exposing production networks
  • Customer/Partner Environments - You have no control over customer firewalls or network topology, making monitoring their hosted integrations nearly impossible
  • Outbound-Only Policies - Many security-conscious environments allow only outbound HTTPS traffic, blocking traditional client-server monitoring architectures
  • Multi-Tenant Isolation - Cloud deployments require per-customer network isolation, preventing shared monitoring infrastructure from reaching tenant-specific systems
  • Dynamic IP Addresses - Cloud auto-scaling and dynamic infrastructure make static firewall rules impractical and brittle

The Breaking Point: You've deployed Nodinite centrally, but 40% of your integration estate is unreachable—cloud migrations stalled because monitoring won't work, customer environments invisible to your operations team, remote sites requiring expensive on-premise monitoring servers.

How Azure Service Bus Relaying Solves This

Section titled “How Azure Service Bus Relaying Solves This”

Microsoft Azure Relay (Service Bus relay service from Microsoft) provides a reverse connectivity pattern that fundamentally changes how distributed monitoring works. Instead of the Nodinite Core Services, the Monitoring Service and the Web API, reaching in to agents (requires inbound firewall rules), each Monitoring Agent connects out to an Azure Relay Hybrid Connection and waits for requests. Every Nodinite Monitoring Agent supports Service Bus Relaying:

  • ✅ Outbound Connections Only - Monitoring Agents open persistent outbound connections to the relay (*.servicebus.windows.net in public Azure), so no inbound rule is needed on the agent's network
  • ✅ No Inbound Firewall Rules - The central Monitoring Service and Web API connect to the same Azure Relay endpoint, eliminating the need for VPNs, port forwarding, or DMZ configurations
  • ✅ Cloud-Native Scalability - Azure handles connection pooling, load balancing, and geographic distribution automatically
  • ✅ Multi-Tenant Ready - Each agent uses its own Hybrid Connection (or namespace), providing isolation between customers, partners, and environments
  • ✅ Works Everywhere - Identical configuration for on-premise, Azure, AWS, customer data centers, partner networks—any location with outbound internet access
  • ✅ Built-in Security - All traffic encrypted with TLS 1.2+, authenticated via Shared Access Signatures (SAS), with Azure-managed certificate infrastructure
  • ✅ Cost-Effective - Pay only for actual relay usage (listener hours + data transfer), eliminating expensive VPN appliances and dedicated network infrastructure

Real-World Transformation: Install a Monitoring Agent in a customer's locked-down Azure subscription with zero networking changes—just give the agent a Relay Hybrid Connection and its SAS connection string. Within minutes, your central Nodinite deployment can monitor their BizTalk environment, execute Remote Actions, and trigger alerts, all through outbound-only connections.

Understanding the Hybrid Connection Architecture

Section titled “ Understanding the Hybrid Connection Architecture”

Two Core Services call each agent through the Relay URL:

  • The Monitoring Service polls Resources, runs auto-healing Remote Actions, and takes scheduled configuration backups, as its service account.
  • The Web API makes every call a user waits for: Remote Actions, metrics and graphs, Remote Configuration, diagnostics, the agent's status, and custom Monitor View columns.

The relay forwards each request to the listener inside the agent, which passes it to the agent's local HTTP endpoint. HTTP methods, headers, and request bodies are preserved. The agents can run in Azure datacenters, your on-premises enterprise, or remote customer and partner sites.

flowchart LR subgraph CORE["Nodinite Core Services Server"] MS["fa:fa-watch-fitness Monitoring Service"] API["fa:fa-cloud-bolt Web API"] end subgraph AZ["Microsoft Azure"] RELAY["fa:fa-cloud Azure Relay namespace
Hybrid Connection"] end subgraph AGENT["Nodinite Agent Server (any network)"] LISTENER["fa:fa-tower-broadcast Relay listener
UseAzureRelay=true"] LOCAL["fa:fa-link Local agent endpoint
LocalWcfBaseUrl"] LISTENER --> LOCAL end MS -->|"outbound HTTPS 443
Service URL + SAS"| RELAY API -->|"outbound HTTPS 443
Service URL + SAS"| RELAY LISTENER -->|"outbound, listens"| RELAY style MS fill:#2678BD style API fill:#2678BD style RELAY fill:#9E59BB style LISTENER fill:#3F827B style LOCAL fill:#3F827B

Hybrid Connection architecture: the Monitoring Service and the Web API (blue) and the Monitoring Agent host (teal) all connect outbound to the Azure Relay (purple); neither side needs an inbound firewall rule. Ports for every hop are on the Monitoring Service firewall page.

sequenceDiagram participant MS as Monitoring Service or Web API participant Relay as Azure Relay participant Agent as Agent relay listener participant Local as Local agent endpoint MS->>Relay: HTTP request to Service URL (Authentication Key) Relay->>Agent: Forward request over the listener connection Agent->>Local: Call local endpoint path Local->>Agent: Response Agent->>Relay: Return response Relay->>MS: Return response

Request flow: the Monitoring Service and the Web API call the agent through the relay exactly as they would over the local network. The Web Client never calls an agent itself; it goes through the Web API.

Component Role Where you configure it
Azure Relay namespace Hosts the relay endpoint <relay-namespace>.servicebus.windows.net in public Azure; Azure Government and Azure China use servicebus.usgovcloudapi.net and servicebus.chinacloudapi.cn Azure Portal
Hybrid Connection (EntityPath) One relay channel per agent Azure Portal, inside the namespace
Shared Access Signature (SAS) policies Two per Hybrid Connection: one with Listen only, for the agent, and one with Send only, for Nodinite Azure Portal (SAS)
Agent relay settings UseAzureRelay, RelayConnectionString, HybridConnectionName, LocalWcfBaseUrl The agent's local configuration file
Monitoring Agent Configuration Service URL and Authentication Key the Monitoring Service and the Web API use Web Client, Administration

Running Nodinite Monitoring Agents with Service Bus Relaying incurs costs based on:

  • Number of installed agents using Service Bus Relaying
  • Synchronization interval set in Monitoring Agent Configuration
  • State changes in exposed Resources—error-prone environments may cost more
  • Caching—All Nodinite Monitoring Agents support ETAG caching to reduce costs and boost performance
  • Number of Remote Actions executed
  • The time each agent's listener is connected: Azure Relay bills Hybrid Connections per listener hour, plus the data transferred

For the current pricing, see Microsoft's Azure Relay pricing.

Configure a Monitoring Agent for Service Bus Relaying

Section titled “ Configure a Monitoring Agent for Service Bus Relaying”

These steps apply to any installed Monitoring Agent.

  • The outbound firewall rules for the relay, on both the Core Services Server (for the Monitoring Service and the Web API) and the Agent Server; see Firewall
  • An Azure Subscription with a valid credit card, where your account has at least the Contributor role, to create Relay resources
  • An installed agent whose local endpoint answers on the agent server, for example http://localhost:8000/Nodinite/Monitor/Agent/WindowsServer/IsAlive (see Why do Nodinite use port 8000)
  • The agent's runtime installed, as listed on the agent's Prerequisites page; for example the Windows Server Monitoring Agent prerequisites

Step 1: Create the Azure Relay Namespace and Hybrid Connection

Section titled “Step 1: Create the Azure Relay Namespace and Hybrid Connection”
  1. In the Azure Portal, create a Relay namespace. The endpoint address must be unique; for multiple agents, create one Hybrid Connection per agent, or separate namespaces.
    Create or select the Service Bus relay namespace in Azure
    Create or select the relay namespace in the Azure Portal.
  2. Inside the namespace, create a Hybrid Connection. Its name is the EntityPath.
  3. On the Hybrid Connection, create two Shared Access Signature policies: one with only Listen, for the agent (Step 2), and one with only Send, for the Monitoring Service and the Web API (Step 4). Never use the namespace's root key (RootManageSharedAccessKey) or a policy with Manage. For the Send policy, copy its name (SharedAccessKeyName) and its primary or secondary key (SharedAccessKey).
    Shared access policies page of a Relay namespace in the Azure Portal, with a policy opened to show its claims and keys
    Where the policy name and its claims are shown. This example opens the namespace's root policy, which has Manage: don't use it, create the Send and Listen policies on the Hybrid Connection instead.
    A Shared Access Signature policy in the Azure Portal with its primary and secondary keys and connection strings, keys blurred
    Each policy has a primary and secondary key and a connection string. The agent gets the Listen policy's connection string; Nodinite gets the Send policy's name and key.

Open the agent's local configuration file (App.config or .exe.config) and add or update these settings under <appSettings>:

  • UseAzureRelay – set to true to enable relay mode
  • RelayConnectionString – paste the connection string of the Hybrid Connection's Listen policy
  • HybridConnectionName – the Hybrid Connection name (EntityPath)
  • LocalWcfBaseUrl – the agent's local endpoint, e.g. http://localhost:8000
  • Optional: tune timeouts and concurrency for performance
  • Restart the Windows service hosting your agent to apply configuration changes
  • Confirm the agent logs show the relay listener is online and ready

Step 4: Configure the Monitoring Agent in the Web Client

Section titled “Step 4: Configure the Monitoring Agent in the Web Client”

In Monitoring Agent Configuration, set the Service URL on the Connection tab, and the Authentication Key on the Security tab. Field details are on the Connection Tab and Security Tab sections.

The Service URL uses the format https://<relay-namespace>.servicebus.windows.net/<hybrid-connection-name><agent-path>, for example https://dev-relay.servicebus.windows.net/relay-hybrid-connection/Nodinite/Monitor/Agent/WindowsServer. The agent path is in the agent's README.txt.
Connection tab with the Service URL field, the Service Bus Relay Hybrid Connection URL format, and the Polling Interval set to 60 (7.10)
The help text under Service URL shows the Hybrid Connection URL format and an example.

On the Security tab, check Authenticate Connection, and enter the Service Bus Relay Hybrid Connection string with EntityPath in the Authentication Key field. From Nodinite 7, the format is:

Endpoint=sb://<relay-namespace>.servicebus.windows.net/;SharedAccessKeyName=<shared-access-key-name>;SharedAccessKey=<shared-access-key>;EntityPath=<relay-hybrid-connection>;AuthenticationKey=<agent-authentication-key>

Security tab with Authenticate Connection checked and its help text naming the Monitoring Service and the Web API, the Authentication Key (blurred), and the Service Bus Relay Hybrid Connection string format ending in the optional AuthenticationKey part (7.12)
The help text below the Authentication Key field shows the Hybrid Connection string format with its optional AuthenticationKey part. With Authenticate Connection checked, both the Monitoring Service and the Web API use it.

  1. Endpoint—the Azure Relay namespace, sb://<relay-namespace>.servicebus.windows.net/
  2. SharedAccessKeyName—the name of the Send policy from Step 1
  3. SharedAccessKey—the primary or secondary key of that policy
  4. EntityPath—the name of the Hybrid Connection; required
  5. New 7.12 AuthenticationKey—optional; the agent's own Authentication Key, sent to the agent as X-ApiKey. Leave it out, or leave it empty, and the default key is sent. Azure Relay never sees this part: only the first four sign the SAS token.

The parts are separated by ;, in any order, and their names aren't case-sensitive. The whole string holds at most 1024 characters. Nodinite treats the field as a relay string when Authenticate Connection is checked and the string contains SharedAccessKeyName; otherwise it sends the field as a plain API key. The agent needs nothing relay-specific: it checks the X-ApiKey it receives the same way as on a direct connection, so AuthenticationKey is the key the agent already expects (see its README.txt).

The Endpoint host must end in a Service Bus ending: servicebus.windows.net (public Azure), servicebus.usgovcloudapi.net (Azure Government), or servicebus.chinacloudapi.cn (Azure China). New 7.12 For another sovereign cloud, such as Bleu (servicebus.sovcloud-api.fr), add its ending to the System Parameter ServiceBusRelayHostSuffixes; any other host is refused, and nothing is sent to it. The Core Services build the SAS token from this string themselves, so nothing about the relay is set in the Portal or on the Core Services Server. This string holds the Send-only policy; the agent's own configuration holds the Listen-only one, so neither side can do the other's part.

  • Use a tool like curl or Postman to send requests to the Azure Relay URL
  • Include the headers the Core Services send: X-ApiKey with the agent's key (the default key unless the connection string sets its own), and ServiceBusAuthorization with a SAS token for the audience https://<relay-namespace>.servicebus.windows.net/
  • Verify responses are forwarded from the local agent endpoint, then check the agent in the Web Client

Both the Core Services Server (the Monitoring Service and the Web API) and the Agent Server open outbound connections to the relay host: *.servicebus.windows.net in public Azure, or the Service Bus ending of your cloud (see ServiceBusRelayHostSuffixes); no inbound rules are needed. On the Core Services Server, both processes need only TCP 443, connect directly, and don't use a proxy. The Agent Server needs only TCP 443 too: the agent's relay listener uses Azure Relay Hybrid Connections, which run WebSockets over TLS. The AMQP ports (5671–5672) and the WCF Relay ports (9350–9354) aren't used. Allow the relay host by DNS name, not by IP address, because the relay gateway addresses change. The ports for each hop are listed in one place:

  • 404 errors – check that the Service URL path matches the local endpoint path and that the relay strips the entity path correctly
  • 401/403 errors – check the SAS policy rights and the Authentication Key string (v7 format, with EntityPath)
  • 500 errors – review the agent logs for method, path, target, and status
  • Endpoint host '…' is not a Service Bus Relay host – the Endpoint part of the Authentication Key isn't a Service Bus host; check it, and for a sovereign cloud add its ending to ServiceBusRelayHostSuffixes
  • No answer at all – confirm UseAzureRelay=true is set, the agent service was restarted, and the outbound Firewall rules are open
  • Monitoring works, but Remote Actions, configuration, or diagnostics say the agent is off-line – the Web API can't reach the relay, while the Monitoring Service can; open outbound 443 for the Web API too
  • Ensure TLS 1.2 is enabled, adjust connection limits for high concurrency, and use the Azure Portal to monitor relay usage and access policies

When the agent's local endpoint (LocalWcfBaseUrl) is a WCF service, you can enable WCF diagnostics logging to debug it. See Microsoft docs. Add the following <system.diagnostics> section to the local config file (.config):

...
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
propagateActivity="true" >
<listeners>
<add name="xml"/>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="xml"/>
</listeners>
</source>
<source name="myUserTraceSource"
switchValue="Information, ActivityTracing">
<listeners>
<add name="xml"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="C:\Temp\WCFlog\Error.svclog" />
</sharedListeners>
</system.diagnostics>
</configuration>
...

Contact our Support for additional guidance if you cannot resolve the problem.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...