# Azure Relay

Azure Relay is a managed connectivity service that connects applications across network boundaries without requiring inbound firewall ports on the network hosting the service.

Cloud service · Azure. Updated 2026-11-25. Page: https://blowstack.com/tools/cloud-services-hub/azure-relay

> Azure Relay exposes application endpoints through a cloud-hosted relay while the backend service maintains outbound connections from its existing network. It provides HTTP and WebSocket-based Hybrid Connections for cross-platform applications and WCF Relay for existing Windows Communication Foundation services.

## 8 key features of Azure Relay

1. **Outbound-initiated backend connectivity**: Listeners connect outward to Azure Relay, allowing backend services to remain behind NAT and firewalls without inbound port forwarding. Network teams must still permit the required outbound traffic and protocol behavior.
2. **Cross-platform Hybrid Connections**: Hybrid Connections use documented HTTP and WebSocket protocols for request-response communication and bidirectional streams. Use client libraries or a compatible protocol implementation for applications outside the WCF ecosystem.
3. **WCF Relay bindings**: Existing full .NET Framework WCF services can expose endpoints through relay-specific bindings. This preserves the WCF programming model while moving the externally reachable endpoint to Azure.
4. **Scoped connection authorization**: Shared Access Signature policies distinguish Send, Listen, and Manage rights. Hybrid Connections also support Microsoft Entra ID authorization, allowing applications to use identity-based access rather than shared keys.
5. **Namespace IP filtering**: Namespace-level firewall rules restrict access to specified IPv4 addresses and CIDR ranges. Account for the public egress addresses of both senders and listeners when configuring access.
6. **Private endpoint access for senders**: Azure Private Link enables sender clients in a virtual network to reach a Relay namespace through a private IP address. Configure private DNS and validate the listener connection path separately.
7. **Multiple concurrent listeners**: A relay entity supports up to 25 concurrent listeners, allowing multiple backend processes to accept connections. Design listeners so a new connection can be handled by any eligible instance, and implement recovery for interrupted sessions.
8. **Application-scoped exposure**: Relay exposes specific application endpoints rather than providing general network routing. This is useful when a cloud application needs access to one internal service but does not require a VPN connection to the surrounding network.

## Where Azure Relay is used

1. **Cloud applications accessing internal APIs**: Run a listener near an internal inventory or order-processing service and let a cloud application call it through a Hybrid Connection. Apply application-level authorization before forwarding requests to the internal backend.
2. **Incremental modernization of WCF systems**: Expose an existing WCF service to cloud-hosted clients using WCF Relay while retaining its current hosting environment. Assess binding and contract compatibility before migrating individual endpoints to Hybrid Connections.
3. **App Service access to private TCP endpoints**: Use App Service Hybrid Connections and an on-premises Hybrid Connection Manager to reach a configured hostname and TCP port, such as an internal database endpoint. Confirm App Service operating-system and plan support before choosing this integration.
4. **Cross-network interactive connections**: Use a Hybrid Connection stream for a custom support tool or administrative application whose endpoints cannot accept inbound connections. Implement explicit user authorization, session auditing, and limits on what the listener can access.
5. **Endpoint-specific partner access**: Give a partner application permission to send to a dedicated relay entity rather than granting broad corporate network access. Keep the listener narrowly scoped and validate every operation against the partner's application identity.

## How Azure Relay is priced

- **Hybrid Connections listener-based billing**: Hybrid Connections pricing is based on listener units, with a data-transfer allowance and additional transfer charges under the applicable offer. Estimate listener usage and relayed traffic, and check current billing granularity and allowance rules before sizing costs.
- **WCF Relay hours and messages**: WCF Relay is billed using relay hours and message volume rather than Service Bus messaging operations. WCF Relay is available only in Standard-tier namespaces; calculate costs using the applicable message-metering rules.
- **Associated network and integration charges**: Applicable outbound data-transfer charges can apply in addition to Relay usage. Include separately billed resources such as private endpoints, App Service plans, monitoring ingestion, and listener hosting in the total architecture cost.

## Services Azure Relay works with

A common architecture places a cloud application in Azure App Service and a listener or Hybrid Connection Manager inside the network hosting the backend. The cloud application connects through Relay, while the on-premises component maintains outbound connectivity and reaches the internal API or configured TCP endpoint. App Service Hybrid Connections provides a managed integration for supported configurations; custom Hybrid Connections listeners give application code direct control over HTTP handling or stream processing.

Identity and secret management should follow the connection roles. Use Microsoft Entra identities and narrowly scoped Relay roles where supported. If SAS credentials are required, store them in Key Vault, separate Send and Listen permissions, and plan credential renewal and rotation. Instrument both sides with Azure Monitor-compatible telemetry and propagate correlation identifiers so engineers can distinguish Relay connectivity failures from backend application errors.

For virtual-network-hosted senders, Private Link can provide private endpoint access to the Relay namespace. Treat private DNS, public access restrictions, and listener egress as separate configuration tasks. Managed integrations such as Azure Machine Learning Kubernetes connectivity may also require trusted-service access settings; follow the integration-specific network requirements rather than assuming a private endpoint alone permits every required connection.

- **[App Service](https://blowstack.com/tools/cloud-services-hub/app-service)**: App Service Hybrid Connections uses Azure Relay to connect a supported app to a configured TCP hostname and port through Hybrid Connection Manager. For example, a web application can connect to an on-premises SQL Server endpoint without opening an inbound firewall port. This is endpoint-specific TCP connectivity, not a VPN or general-purpose network route, and support depends on the App Service operating system and plan.
- **[Microsoft Entra ID (formerly Azure AD)](https://blowstack.com/tools/cloud-services-hub/microsoft-entra-id-(formerly-azure-ad))**: Hybrid Connections can use Microsoft Entra access tokens and Azure role-based access control to authorize senders and listeners. For example, a cloud application can use a managed identity with the Azure Relay Sender role while a separate backend identity receives the Azure Relay Listener role. Keep Relay connection authorization separate from authorization for the business operations carried over the connection.
- **[Azure Key Vault](https://blowstack.com/tools/cloud-services-hub/azure-key-vault)**: Applications using SAS authentication can store Relay credentials in Key Vault instead of embedding them in source code or deployment templates. For example, a listener can retrieve a Listen-only credential at startup through an identity authorized to read that secret. Credential rotation must include reloading secrets and renewing or reconnecting affected Relay sessions.
- **[Azure Monitor](https://blowstack.com/tools/cloud-services-hub/azure-monitor)**: Use Azure Monitor for available Relay metrics and instrument sender and listener applications with Application Insights or OpenTelemetry. For example, alert on connection failures and correlate a cloud HTTP request with the listener's downstream database call. Carry an application correlation identifier across the relay boundary rather than assuming transport connectivity provides end-to-end tracing.
- **[Azure Private Link](https://blowstack.com/tools/cloud-services-hub/azure-private-link)**: A Relay namespace can be accessed through a private endpoint for supported sender connectivity from a virtual network. For example, a virtual-network-hosted sender can resolve the namespace to a private IP address and connect without using its public endpoint. Configure private DNS and public-network restrictions deliberately, and test listener egress separately because sender-side Private Link does not make all connection paths private.
- **[Azure Machine Learning](https://blowstack.com/tools/cloud-services-hub/azure-machine-learning)**: Azure Machine Learning Kubernetes integration uses Azure Relay for communication between the managed service and an attached Kubernetes cluster. For example, a cluster in a restricted network can participate in the supported Azure Machine Learning connection architecture without exposing an inbound service endpoint. Where required by that architecture, configure Relay's trusted Microsoft services access setting alongside the namespace firewall.
- **[API Management](https://blowstack.com/tools/cloud-services-hub/api-management)**: Azure Relay recognizes API Management as a trusted Microsoft service. With the trusted-service firewall exception enabled on a Relay namespace, supported API Management requests can reach the namespace without matching its IP allowlist.
- **[Azure Analysis Services](https://blowstack.com/tools/cloud-services-hub/azure-analysis-services)**: Azure Relay carries traffic between Azure Analysis Services and the on-premises data gateway. For example, a model can refresh from an on-premises SQL Server through a connection the gateway opens outbound.
- **[Azure Arc](https://blowstack.com/tools/cloud-services-hub/azure-arc)**: Azure Relay provides Hybrid Connections for Azure Arc features such as SSH access to Arc-enabled servers and Cluster Connect for Arc-enabled Kubernetes. The Arc hybrid connectivity resource provider can create the connections and supply connection information to the Arc service that uses them.
- **[Azure Blob Storage](https://blowstack.com/tools/cloud-services-hub/azure-blob-storage)**: Azure Relay can archive namespace resource logs to an Azure Storage account through an Azure Monitor diagnostic setting. The logs are written to blob containers, where they can be retained for later investigation.
- **[Azure Data Explorer](https://blowstack.com/tools/cloud-services-hub/azure-data-explorer)**: Azure Relay lists Azure Data Explorer as a trusted Microsoft service. Enabling the trusted-service exception on a Relay namespace lets supported Azure Data Explorer traffic reach it without matching its IP firewall rules.
- **[Azure Data Factory](https://blowstack.com/tools/cloud-services-hub/azure-data-factory)**: Azure Relay provides the communication channel used by the Azure Data Factory self-hosted integration runtime for interactive authoring unless self-contained interactive authoring is enabled. For example, Data Factory can use that channel to ask the runtime to test a connection to an on-premises database.
- **[Azure Database Migration Service](https://blowstack.com/tools/cloud-services-hub/azure-database-migration-service)**: Azure Relay supports the control connection used by the self-hosted integration runtime in Azure Database Migration Service workflows that migrate SQL Server from local backup files. The runtime reads and uploads the backup files; Relay does not carry the backup data itself.
- **[Azure Digital Twins](https://blowstack.com/tools/cloud-services-hub/azure-digital-twins)**: Azure Relay recognizes Azure Digital Twins as a trusted Microsoft service. The trusted-service exception lets supported Azure Digital Twins traffic bypass the Relay namespace's IP firewall without removing its authentication requirements.
- **[Azure DNS](https://blowstack.com/tools/cloud-services-hub/azure-dns)**: Azure Relay private endpoints can use the Azure Private DNS zone `privatelink.servicebus.windows.net`. With the zone linked to a virtual network, clients can resolve the Relay namespace hostname to the private endpoint's IP address.
- **[Azure ExpressRoute](https://blowstack.com/tools/cloud-services-hub/azure-expressroute)**: Azure Relay supports access from on-premises clients over ExpressRoute. With ExpressRoute private peering, clients can reach a Relay private endpoint in a connected virtual network without using the namespace's public endpoint.
- **[Azure Functions](https://blowstack.com/tools/cloud-services-hub/azure-functions)**: Azure Relay powers the App Service Hybrid Connections feature available to eligible Azure Functions apps. A function can use a Hybrid Connection to reach an on-premises TCP endpoint, such as a database, without exposing that endpoint to inbound internet traffic.
- **[Azure Health Data Services](https://blowstack.com/tools/cloud-services-hub/azure-health-data-services)**: Azure Relay recognizes Azure Health Data Services as a trusted Microsoft service. When the trusted-service exception is enabled, supported requests from Azure Health Data Services can bypass the namespace firewall while still requiring authorization.
- **[Azure IoT Central](https://blowstack.com/tools/cloud-services-hub/azure-iot-central)**: Azure Relay includes Azure IoT Central in its trusted Microsoft services list. A namespace can allow supported IoT Central traffic through its firewall without adding IoT Central source addresses to the IP allowlist.
- **[Azure IoT Hub](https://blowstack.com/tools/cloud-services-hub/azure-iot-hub)**: Azure Relay can grant Azure IoT Hub a trusted-service exception to a namespace's IP firewall. Supported IoT Hub requests still need authorization to access Relay resources.
- **[Azure Kubernetes Service (AKS)](https://blowstack.com/tools/cloud-services-hub/azure-kubernetes-service-(aks))**: Azure Relay provides a bidirectional communication channel between Azure Machine Learning and an AKS cluster configured as Kubernetes compute. The Azure Machine Learning extension on the cluster uses this channel for service communication across network boundaries.
- **[Azure Load Balancer](https://blowstack.com/tools/cloud-services-hub/azure-load-balancer)**: Azure Relay uses Azure Load Balancer in its WCF Relay gateway infrastructure. The load balancer routes an incoming listener registration to a Relay gateway node; customers do not provision a load balancer for the namespace.
- **[Azure Policy](https://blowstack.com/tools/cloud-services-hub/azure-policy)**: Azure Relay namespaces can be evaluated by Azure Policy using their `Microsoft.Relay/namespaces` resource properties. For example, a policy can audit namespaces that leave public network access enabled.
- **[Azure portal](https://blowstack.com/tools/cloud-services-hub/azure-portal)**: Azure Relay has dedicated management pages in the Azure portal for creating namespaces and relay endpoints, configuring access policies and network rules, and approving or rejecting private endpoint connections.
- **[Azure Resource Manager](https://blowstack.com/tools/cloud-services-hub/azure-resource-manager)**: Azure Relay exposes namespaces, Hybrid Connections, WCF relays, authorization rules, and network rule sets as Azure Resource Manager resource types. An ARM template can deploy a namespace together with its endpoints and access configuration.
- **[Azure role-based access control (Azure RBAC)](https://blowstack.com/tools/cloud-services-hub/azure-role-based-access-control-(azure-rbac))**: Azure Relay uses Azure RBAC to authorize Microsoft Entra principals through built-in roles such as Azure Relay Sender, Azure Relay Listener, and Azure Relay Owner. An application can be granted permission to send to a relay without being allowed to listen on it.
- **[Azure Stream Analytics](https://blowstack.com/tools/cloud-services-hub/azure-stream-analytics)**: Azure Relay recognizes Azure Stream Analytics as a trusted Microsoft service. Enabling the trusted-service exception lets supported Stream Analytics traffic pass the namespace's IP firewall without adding source IP addresses to the allowlist.
- **[Azure Synapse Analytics](https://blowstack.com/tools/cloud-services-hub/azure-synapse-analytics)**: Azure Relay supports interactive authoring for Synapse pipelines that use a self-hosted integration runtime, such as testing a connection to an on-premises data source. Relay also recognizes Synapse Analytics in its trusted Microsoft services firewall setting.
- **[Azure Virtual Network](https://blowstack.com/tools/cloud-services-hub/azure-virtual-network)**: Azure Relay can expose a namespace through a private endpoint with an IP address from an Azure Virtual Network subnet. Workloads can reach that specific namespace over the private endpoint rather than its public IP address.
- **[Event Grid](https://blowstack.com/tools/cloud-services-hub/event-grid)**: Azure Relay Hybrid Connections can receive events as an Event Grid subscription destination. An on-premises listener can consume the events through its outbound connection to Relay without exposing a public webhook.
- **[Event Hubs](https://blowstack.com/tools/cloud-services-hub/event-hubs)**: Azure Relay can stream namespace resource logs to Event Hubs through an Azure Monitor diagnostic setting. Downstream consumers can then process Relay connection activity as it arrives.
- **[Logic Apps](https://blowstack.com/tools/cloud-services-hub/logic-apps)**: Azure Relay carries requests and responses between Logic Apps managed connectors and the on-premises data gateway. For example, a workflow can query an internal SQL Server through the gateway without opening an inbound firewall port.
- **[Microsoft Fabric](https://blowstack.com/tools/cloud-services-hub/microsoft-fabric)**: Azure Relay provides the communication channel used by the on-premises data gateway for supported Microsoft Fabric workloads. For example, Fabric can refresh a semantic model from an on-premises source through the gateway's outbound Relay connection.
- **[Microsoft Purview](https://blowstack.com/tools/cloud-services-hub/microsoft-purview)**: Azure Relay supports interactive operations for Microsoft Purview's self-hosted integration runtime, such as testing a connection to a source on a private network. Relay can also admit supported Purview traffic through Hybrid Connections provisioned by Azure Arc when trusted-service access is enabled.
- **[Power BI Embedded](https://blowstack.com/tools/cloud-services-hub/power-bi-embedded)**: Azure Relay carries traffic for the on-premises data gateway when a report in Power BI Embedded uses a semantic model connected to an internal data source. For example, the gateway can relay DirectQuery requests to an on-premises SQL Server without exposing the server publicly.

## What is Azure Relay

Azure Relay provides application-level connectivity between services in private networks and callers in Azure, other datacenters, or external networks. Instead of publishing a backend server directly to the internet, an application registers a listener with a Relay namespace through an outbound connection. A sender connects to the corresponding relay address, and Azure Relay forwards traffic between the sender and the listener. The backend can remain behind network address translation and a firewall without accepting unsolicited inbound connections.

A namespace is the management and addressing boundary for relay resources. Within it, engineers create Hybrid Connections or WCF Relay endpoints. Hybrid Connections use HTTP and WebSockets and support request-response exchanges and bidirectional streams. Applications can use supported client libraries or implement the documented protocol with a compatible WebSocket library. WCF Relay instead uses relay-specific WCF bindings and is intended for services built on the full .NET Framework and Windows Communication Foundation.

For a Hybrid Connection, the listener establishes a persistent outbound WebSocket control channel and authenticates with permission to listen. When a sender requests a connection, the listener accepts it and establishes the necessary communication path through Relay. For HTTP scenarios, senders can issue HTTPS requests to the relay endpoint and receive responses from the listener. Relay does not host the backend application: engineers must deploy, patch, monitor, and scale the listener process and any internal services it calls.

Authorization and network access are separate design concerns. Shared Access Signatures can grant scoped Send or Listen permissions, and Hybrid Connections also support Microsoft Entra ID-based authorization. Keep sender and listener permissions separate rather than distributing a namespace management key. Relay authorization controls access to the connection; the application must still enforce business-level authorization for operations and data. Sender authentication is enabled by default for Hybrid Connections and should remain enabled unless an intentionally public endpoint has appropriate application protections.

Namespace-level IPv4 firewall rules can restrict access to known source addresses. Private Link supports private endpoint access for sender clients; it should not be treated as proof that every listener path is private. Validate listener egress, DNS resolution, proxy behavior, and WebSocket support independently. Relay does not support virtual network service endpoints.

Operationally, treat Relay as a live transport rather than a durable message broker. If no listener is available or a connection fails, applications need appropriate timeouts, reconnection logic, and safe retry behavior. Maintain control-channel keepalives and renew expiring credentials. Multiple listeners can improve availability, subject to service quotas, but they do not make an interrupted application session durable. Use Service Bus queues or another persistent messaging system when requests must survive backend outages.
