Establish Azure Hybrid connection ⛈

Pratheep VR
4 min readMar 4, 2021

This article covers the topic of establishing a Hybrid connection in Azure. The hybrid connection is not available in the free tier.

Azure Hybrid

The Azure hybrid connection represents a connection between Azure app service and TCP endpoint. TCP endpoint can be any port connecting to any database or any service

Why Hybrid connection?🙄

  • The app can access the on-premises system and service securely
  • It does not require an internet-accessible endpoint
  • It works on the network level so it can work on any app service deployable language.
  • It can be used to provide access to multiple networks from a single app.
Connection flow

Let’s first have a basic understanding of the process

  • Web App — App service which is hosted in Azure. We will be using Express
  • Relay hybrid connection — A relay will connect two parties by providing a rendezvous point in the Azure cloud that parties can discover and connect
  • Hybrid Connection Manager — Will be installed on our local system and configured to connect the Azure
  • Endpoint — Any service can be a database or port

Let’s get into action now 🌠🌠

  1. Creating a Hybrid connection in Azure
  • Let’s create an app service (I’ll call mine hybridN20 )
  • Once the app service is created navigate to the networking Configure hybrid connection endpoints
Configure hybrid connection endpoint page

Note: connection quota count is based on the plan you choose

To setup hybrid, we need to do some work on the on-premises system and azure hybrid configuration page

First, will set up on the azure hybrid configuration page

Click on Add hybrid connectioncreate new hybrid connection → fill the respective data

Hybrid connection Name: can be any name it’s just for your reference

Endpoint Host: Host where the hybrid connection manager is installed ie. On-premises system.

Endpoint Port: Port of the service you wish to connect (5432 — default port for PostgreSQL )

Location: Select the region from which you expect your customers will access the service the most

Name: can be any name it’s just for your reference

Click 🆗

on successful creation, you can see azure hybrid connection details below

the status is Not connected because we didn’t set up a hybrid connection manager on the on-premise system

Now let’s set up a hybrid connection manager on-premise system

Download and install the Hybrid connection manager from the Hybrid connection screen

Once the installation is completed run hybrid connection manager UI

Hybrid connection manager UI

Click on Add a new Hybrid connection → this will take you to the login page (login with your azure credentials )

select your subscription → you will see the hybrid connection named hybridn20 ( which we have created on the Azure portal ) → click save ✅

but still, the connection manager shows the connection is not connected 😞

💡Let’s make it connected by doing a service restart

Open the Windows services console → find the Azure Hybrid Manager service. → Hybrid Connection Manager UI → Restart the service and return to application → click refresh on connection manager UI.

connection successful status on on-premises
Connection successful status on Azure portal

now while deploying your nodeJS or .net application in database configuration just in place of the host as DESKTOP-29CFMCQ and the connection will be established and works.

--

--

Pratheep VR

Technology🔮 | AVP at Citi 💼 | Ex-Nokia 📱 | Juggling bits and bytes with a wink! 😉