Azure Private Endpoints vs. Service Endpoints

Azure Private Endpoints vs. Service Endpoints Azure enables the integration of your Services with virtual networks. This allows traffic to be restricted to only access through the Virtual Networks infrastructure in Azure, including peered a

Source comparison and review notes
  • Automated pair-review warning (AI bilingual content review): The English article drops the Spanish dedicated-VNet benefits list, the Service Endpoint compatible-services and configuration sections, and the entire populated Private Endpoints versus Service Endpoints comparison table; its corresponding table heading is empty.

Azure enables the integration of your Services with virtual networks. This allows traffic to be restricted to only access through the Virtual Networks infrastructure in Azure, including peered and on-premises networks.

Azure provides us with the following options for integration:

  • Deploy dedicated services on VNET.
  • Private Endpoints.
  • Service Endpoints.
  • Service Tags.

In this note we will be exploring the definitions and main differences between each.

Deploy dedicated services on VNET

Some Azure services have this option that allows us to deploy dedicated Azure services within a virtual network to enable private communication using private IP addresses. By implementing these services in a VNet, you get the following benefits:

There are only a few Azure services that can use this functionality, such as: App Service Environment(ASE), RedisCache, Azure SQL Managed Instance, and others.

Full list here: https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-for-azure-services#services-that-can-be-deployed-into-a-virtual-network

Private Endpoints

Private Endpoints allow inbound traffic from your Virtual Network to Azure managed resources, establishing a secure connection through Private Link, without the need to use public IP addresses.

Now let’s explain in more detail how these connections work, but first we need to understand the nature of Managed Services.

What Services Use Private Endpoints?

Most Azure services that support Private Endpoints fall into the category of Platform as a Service (PaaS), as they are fully managed by Azure and offer native integration with Private Link.

It’s important to understand that while services like Azure SQL Database are presented as managed solutions, in essence, they’re backed by a set of Virtual Machines on the backend. Taking the image as a reference, we can explain the concepts of Service Producer Network and Consumer Network in the context of Azure Private Link.

Consumer Network

The Consumer Network refers to the customer’s Virtual Network (VNet), where resources that need to access Azure managed services, such as databases and storage, reside. In the image:

  • The Azure VNet represents the consumer network, with subnets such as Subnet A, Subnet B, and Subnet C.
  • A Private Endpoint has been configured on Subnet C, allowing resources within the VNet to privately access the database service without using public IP addresses.
  • All traffic flows securely through the Azure backbone, ensuring a low-latency connection and increased security.

Service Producer Network

The Service Producer Network is the Azure-managed network where managed services, such as Azure SQL Database and Azure Storage, reside. In the image:

  • The section labeled Azure SQL Database Service represents the service provider’s network, which includes instances such as SQL Server 1 and SQL Server 2, which host databases such as DB1, DB2, and DB3.
  • Traditional connections to these services are usually made using public IP addresses. However, thanks to Private Link, it is possible to establish private connections from the client’s VNet using internal IP addresses.

So, what is a Private Endpoint?

A Private Endpoint in Azure is a feature of PaaS Services that consists of a private network interface that is assigned to an Azure resource within a Virtual Network (VNet), allowing secure and private access to the service using an internal IP address of the network.

Through Azure Private Link, traffic between the VNet and the service flows entirely within the Azure backbone, without being exposed to the internet, ensuring isolation, low latency, and greater security control.

Thus communicating the Service Consumer with the Producer Network.

As we have mentioned, Azure Private Link allows access to Azure PaaS Services through a Private Endpoint in a Virtual Network. The traffic from these links travels through the Azure Backbone, i.e. it does not go out to the internet.

DNS Settings

When we connect to our Private Endpoints, we will have the option to connect through a private DNS name. This will be associated with our Private Endpoint.

In the exemplified case of an Azure SQL Database, we see the following configuration in the DNS Configuration options on the Private Endpoint:

Service Endpoints

Service Endpoints in Azure Virtual Networks allow us to provide connectivity to the Consumer Network from a Private IP (resources in our network) to a Public IP (Azure managed services).

This eliminates the need for public IP addresses in the virtual network, using some NAT Gateway for example, but allows private services to reach these services.

This traffic to the Public IPs of the services only happens within the framework of a VNET. This traffic also goes through the Azure backbone.

In general, Microsoft recommends using Private Endpoints in Service Endpoints.

Table of Differences Between Private Endpoints and Service Endpoints

Service Tags

Azure Service Tags complement the use of Service Endpoints, enabling the ability to allow or restrict traffic to specific services such as Storage, SQL, or KeyVault, without the need to specify individual IP addresses.

Service Endpoints:

  • Service Tags allow controlling access to PaaS services enabled with Service Endpoints, ensuring that only the specified VNet can communicate with them.
  • They simplify firewall rule configuration, ensuring that traffic flows securely through the Azure backbone.

Private Endpoints:

  • They do not require Service Tags, as the connection is established using a private IP within the customer’s VNet.
  • Service Tags do not apply directly since Private Endpoints do not use public IPs.

Mateo Di Loreto

Thanks for reading. The learning continues in the next article.