Updated March 17, 2023
Introduction to Azure Hybrid Connection
Azure hybrid connection is a service in Azure that was used for application services. Azure hybrid connection, as a service, contains the uses and capabilities found in the app service. It is used within the app service to access the resources of an application in any network that was making outbound calls to azure on port 443. It allows app access to a TCP endpoint.
Key Takeaways
- The hybrid connection requires the relay agent into the network, which hosts the hybrid connection endpoint.
- The relay agent is nothing but the hybrid connection manager. We can download this tool from the azure portal; this tool runs on windows 2012 and later versions.
What is Azure Hybrid Connection?
The Azure hybrid connection basically provides access from the application to the TCP endpoint and does not enable the new method of accessing our application. When using it in an application service, each hybrid connection corresponds to a port combination and a single TCP host. This enables our application to access resources on any OS provided by the TCP endpoint.
The feature now knows about the application protocol; it simply provides network access. If we decide to go the hybrid connection app service route to connect our web application into the web app service to another network resource, then the azure hybrid connection is useful.
How to Create Azure Hybrid Connection?
To create the azure hybrid service, we need the following pre-requisites as follows:
Pre-requisites:
- Azure account
- Application (Visual studio)
- MySQL
The below step shows how we can create the azure hybrid connection by using MySQL database and node.js application as follows:
1. In the first step, we login into the MySQL database server by using the root credential as follows.
mysql –u root –p
2. After login into the MySQL database now, in this step, we are creating a database and table MySQL database as follows.
create database hybrid_con;
use hybrid_con;
create table stud_con (id int, name varchar(10));
3. After creating the database and table, now, in this step, we are closing the connection of the database.
quit
4. After creating the database and table and closing the connection, now, in this step, we are creating the node-.js application locally.
5. After creating the application now, in this step, we are running the application as follows.
$ node app,js
6. After running the application now, in this step, we are configuring the app for application service as follows.
const db = mysql.createConnection ({
host: 'localhost',
user: 'root',
password: 'Test@123',
database: 'hybrid_con'
});
7. After configuring the app now, we are deploying our application in the Azure portal as follows.
az webapp up --sku B1 --name myhybrid --os-type Windows
8. After deploying the app, we will login to the azure portal to create a new hybrid connection.
9. After opening the azure portal now in this step, we will click on create a resource to create a new hybrid connection.
10. After creating the function application now in this step, we are creating a new connection for our application.
11. To create the new hybrid connection, we need to click on add hybrid connection tab as follows.
12. After filling in the details of the hybrid connection, we can see that the new hybrid connection is created as follows.
How does Azure Hybrid Connection Work?
It requires the deployment of a relay agent, which will connect to the desired azure endpoint. The below figure shows how the azure hybrid connection works.
The relay agent uses port 443 to contact the hybrid connection manager. The application of service infrastructure is connected to the azure relay via the app site on the web. Our applications can access the desired endpoint by using joined connections.
The connection of azure hybrid uses the TLS 1.2 security and signature of shared access for authorization and authentication. When our application makes a DNS request that matches the endpoint of the hybrid connection, outbound TCP traffic will be redirected using the hybrid connection.
Web App Azure Hybrid Connection
There are a number of ways while use webapps in an azure hybrid connection. Below are the points related to web apps as follows:
- Web apps are securely accessing services and on-premises systems.
- The web app feature has not required the endpoint of internet access.
- We can set up the web app service quickly and easily; we have not required any gateway.
- Each hybrid connection matches a single port combination, which is beneficial for security.
- Web apps do not require firewall holes. Connection is outbound by using standard web ports.
- The web app is used to provide access to multiple networks from a single application.
- It is supported for GA in windows and linux applications. It is not supported in windows custom containers.
App Service Plans
App service in hybrid connections is available in standard, basic, isolated, and premium pricing. Hybrid connection is not available in a function app for the consumption plan.
The below table shows the app service pricing plan as follows:
Sr. No | Pricing Plan | Hybrid Connections Number used in the Plan |
1 | Basic | 5 per plan |
2 | Standard | 25 per plan |
3 | Premium (v1 – v3) | 220 per app |
4 | Isolated (v1 – v2) | 220 per app |
The UI of the app service plan shows how many hybrid connection is used by our application as follows.
We can see all of the information that we previously saw in the app view. By using a hybrid connection, we can also see how many applications will be present in the same pan. The number of hybrid connection endpoints that can be used in the app service plan is limited. Each hybrid connection is being used in a number of applications.
Azure Hybrid Connection Manager
The hybrid connection manager is running as a service and is connecting with the Azure relay on port 443. We run the HCM executable file after installing it to use the tool’s UI. This file is located in the installation directory of HCM. When we first launch the UI of the hybrid connection manager, we can see a list of the hybrid connections that we have created; if we want to make any changes, we must first authenticate with Azure.
If we need to add a new connection, then we need to follow below steps:
1. Start the UI of the hybrid connection manager.
2. After starting UI in this step, we are clicking on add new hybrid connection to create a new connection.
3. While creating the HCM, we need to authenticate with the azure portal and need to select the subscription.
4. In this step, we are selecting the hybrid connection which we require in the HCM relay.
5. After entering on save button in the below example, we can see that a new HCM is created.
FAQs
Given below are the FAQs mentioned:
Q1. What is the use of azure hybrid connection?
Answer: It is used to access application resources in any network and make outbound calls by using port 443.
Q2. What is the use of a hybrid connection manager in the azure hybrid connection?
Answer: The features of a hybrid connection manager require a relay agent onto the host of the network and the endpoint of the hybrid connection.
Q3. What is the requirement of azure hybrid connections?
Answer: We are using it with the app service of azure; the plan of the app service is not running on the free tier.
Conclusion
It basically provides access from the application to the TCP endpoint and does not enable the new method of accessing our application. It is an Azure service that is used for application services. Azure hybrid connection, as a service, includes the uses and capabilities found in the app service.
Recommended Articles
This is a guide to Azure Hybrid Connection. Here we discuss the introduction, how to create an azure hybrid connection, and FAQs. You may also have a look at the following articles to learn more –