Azure Relay Overview
Azure Relay is a service that enables secure communication between applications running in a private corporate network and services in the Azure cloud. It does this without requiring you to open inbound firewall ports on your on-premises network. The service offers two main types: WCF Relays, which work with Windows Communication Foundation, and Hybrid Connections, which use standard web protocols like HTTP and WebSockets. This makes it a firewall-friendly way to connect internal services to the cloud.
Design Relay Namespaces
A relay namespace is a logical container that manages your relays. To create one, you first must check that your chosen namespace name is available within your Azure subscription. Once created, you can apply shared access policies to this namespace. These policies define the authentication keys and permissions, controlling which users or applications can send or listen for messages through the relays in that namespace.
A Hybrid Connection is a specific, point-to-point link between an Azure resource and an on-premises service. To set one up, you first define the on-premises endpoint (like a specific server and port) you want to expose. Then, you install the Hybrid Connection Manager agent on the server hosting that endpoint. This agent initiates and maintains an outbound connection to your Azure Relay namespace over port 443. The on-premises server must be able to perform DNS lookups and have outbound internet access to connect to Azure.
Secure and Reliable Communication
Security is managed through the shared access policies on the namespace, which grant specific send or listen permissions. You can also apply network rules to restrict which IP addresses can connect to your relay, adding another layer of protection. For reliability and high availability, you can install multiple Hybrid Connection Managers on different on-premises machines, providing redundancy if one connection fails. Using Azure Monitor, you can track the connectivity status and performance metrics of your relay namespace to ensure it is operating correctly.