Azure API Management networking explained

Published Apr 03 2022 07:52 AM 5,990 Views

Hi,

 

Microsoft recently announced that Azure Private Link was in preview for Azure API Management. I thought this was a good opportunity to recap and compare the different options from a network perspective. I will also explain how VIP (Virtual IP) and DIP (Dynamic IP) work because the official doc is not 100% accurate on the topic.

 

Introducing the different pricing tiers

 

As you might know, APIM comes with Developer, Consumption, Basic, Standard, Premium tiers. Microsoft also refers to an Isolated (in preview) tier on its pricing page but I do not know what's behind, so let's stick to the other tiers with the exception of the Consumption tier, which I will park since there is nothing to consider network-wise, other than the fact that it has no instance-specific IPs that you can control.

 

From a network perspective, only the DEV and PREMIUM tier integrate with a VNET. The DEV tier allows customers to experiment with VNET integration but is not covered by any SLA, while the PREMIUM tier is covered by an SLA but comes with high costs (about 2500€/month for the first gateway unit, a few hundred euros for the next units). So, often, customers end up using Premium for the sole VNET integration purpose, not for the extra features it offers (such as global distribution).

 

A while ago, Microsoft also came with the self-hosted gateway, which, as the name indicates, allows you to host a gateway wherever you want (on-premises, in another Cloud, etc.), but this also requires the premium tier. Moreover, the self-hosted gateway targets use cases where you want to avoid roundtrips between non-Azure data centers and Azure with the exception of the controlplane, which is used to download the gateway config (policies, etc.). The self-hosted gateway can still work "offline" should the controlplane be unavailable. I will not cover the self-hosted gateway in this blog post, but at least, that was a glimpse of it.

 

While the BASIC and STANDARD tiers come with their own SLAs and might be sufficient for some customers, they cannot integrate with a VNET. The recent announcement from Microsoft, stating that Azure Private Link had become available for all the pricing tiers (except Consumption), could be seen as a game changer, but it is really? That's what we'll see in the next sections but let me first introduce the DIP & VIP concepts.

 

Introducing DIP &  VIP

 

The DIP (Dynamic IP) is a type of IP that is allocated by APIM itself to its underlying machines, to communicate with backend systems. A DIP is subject to change because it is not static, and is Microsoft's internal kitchen. Azure will take any available IP from the subnet in which APIM lives when it needs to allocate a new DIP. If you have several gateway units, you're likely to have several DIPs. If you share a single subnet with multiple APIM instances, they will all allocate their DIPs as they see fit. 

 

On the other hands, a VIP (virtual IP), is not subject to change unless major events such as the accidental deletion of the IP or of the instance, or other major updates such as the integration with another VNET occurs, or switching from Internal to External integration. Depending on the network scenario, APIM may have one public VIP and one private VIP. In a nutshell, VIPs are more reliable than DIPs because they are expected not to change. Public VIPs can be used, only under certain circumstances, in firewall rules while private VIPs and DIPs should never be used in firewall rules. Instead, you should always whitelist the subnet in which APIM lives. We will see the working more in depth in the next section but rule of thumb number 1 is: always use a dedicated subnet for a single APIM instance if you want to be able to make a clear segregation between environments (DEV, TEST, ACC, PRD if you stick to DTAP). Let's see the different network topologies.

 

Introducing network topologies

 

In one of my recent articles, 10 shades of public API hosting in Azure, I already introduced a few concepts, but I was targeting a broader topic: web landing zones. Here I will focus on the API gateway only. Let me start with the first and easiest topology.

 

Using non-VNET APIM

 

As stated earlier, one may perfectly use Basic, Standard & even Consumption tier if we do not need to integrate with a VNET. Figure 1 shows how simple this could be:

 

apim-novnet.png

Figure 1: APIM - No VNET

In this topology, the API gateway is exposed to internet. Anyone having the public VIP and/or the public DNS can start talking to it. All backends see the public VIP as the caller IP. You can typically use that public VIP in Azure Web App's access restriction rules to make sure backend services are called by that specific gateway. Note that, as stated before, the Consumption tier does not have such a VIP. In this topology, there is no DIP (or at least not that we can see). Let us know see the exact opposite topology. 

 

Integrating APIM with a VNET in internal mode

 

In this topology, only available in DEV & PREMIUM tiers, the API gateway is not exposed to internet. The only way to expose the gateway is to use a reverse-proxy with or without a WAF module (preferably with a WAF). It has a system public VIP that is used for outbound traffic only. The gateway is part of a private network perimeter and can be reached by all the systems that have access to its private inbound VIP.. Figure 2 illustrates this topology:

apimvnetinternal.png

Figure 2 - APIM in VNET - Internal mode

For sake of simplicity, I didn't go through a full Hub & Spoke setup with an NVA and custom route tables. I only use Azure's system routes but the public/private VIP and DIP behavior is the same with the whole shebang.

 

Figure 2 covers three scenarios:

 

  • The gateway calls an internet facing backend: the backend sees the public VIP
  • the gateway calls an internal backend within the same VNET as the APIM instance: the backend sees a DIP
  • the gateway calls an internal backend in another VNET (peered) than APIM's VNET: the backend sees a DIP

The latter is where the Microsoft doc is inaccurate IMHO as they state that DIP is only used within the same VNET. So, with such a topology, remember rule of thumb number 1.

 

Integrating APIM with a VNET in external mode

 

This topology is very similar to the previous one except that there is no more private VIP. Figure 3 illustrates it.

 

apimvnetexternal.png

Figure 3 - APIM in VNET - Internal mode

 

The same scenarios as with the previous topology are covered and the same behavior is observed. So, here again, rule of thumb number 1 also applies. Let us know see the Private-Link-enabled APIM.

 

Understanding APIM with private link

I will not explain how the whole private link story works because it is already broadly covered by the official documentation. However, when I saw this announcement, I was really puzzled about its added value. To make sure there was no magic trick (specific to APIM), I quickly created a lab to test the thing out. After my tests (03/2022), I'm still puzzled. 

 

In a nutshell, private link works like this:

  • You enable it for a public PaaS service. By enabling private link, you must choose the subnet in which the private endpoint (private IP) must be created. Note that you can have multiple private IPs for a single PaaS instance. There is a whole setup to do with DNS to make this work fine, which I'll skip as it is not relevant here.
  • After having performed the previous step, you end up with a private inbound IP. With some services (such as Azure SQL, Azure Storage, etc.) you can keep using both the public endpoint and your private endpoint(s). With some others such as Azure App Service, enabling private link automatically denies all public traffic. For APIM, the public VIP is still accessible by default but can be disabled through an API call. I'm not sure whether this is already feasible to disable it in one go using ARM or Terraform.
  • For whatever service (thus including APIM), private link only impacts the inbound traffic, not the outbound one.

What the latter means is that you can access to a PaaS service privately but it does not mean that this service, can, in turn, access other private backends. A good example of this is with Azure Web Apps. if you enable private link for a given web app, you will be able to access it privately but you also need to leverage the VNET integration feature for the outbound traffic, so that the web app can in turn, talk to private backends such as for example an Azure SQL.

 

Figure 4 illustrates this topology:

 

 

apimplink.png

 

Figure 4 - Private-Link-enabled APIM

So, if you patch your instance, you can isolate it from internet but you can only talk to public facing backends. Given the fact that the primary role of an API gateway is to proxy traffic between API consumers and actual backends, I would have expected Microsoft to give us something to manage outbound traffic.  It turns out that with a Private-Link-enabled APIM (in 03/2022), we end up with a private inbound IP for our gateway but we can only talk to public backends because there is not (yet?) a way to manage the outbound traffic...So, this is a niche scenario, where you only want to allow trusted parties (first or third) to consume your gateway, at an affordable cost. In conclusion, this is in no way comparable with a true VNET integration. Note that I numbered the rule of thumb number 1 because here is another rule thumb (number 2): the Cloud is a moving target so if you read this blog post a few months after its publication, review carefully that what I stated here is still valid. 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-3274323%22%20slang%3D%22en-US%22%3EAzure%20API%20Management%20networking%20explained%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3274323%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMicrosoft%20recently%20announced%20that%20Azure%20Private%20Link%20was%20in%20preview%20for%20Azure%20API%20Management.%20I%20thought%20this%20was%20a%20good%20opportunity%20to%20recap%20and%20compare%20the%20different%20options%20from%20a%20network%20perspective.%20I%20will%20also%20explain%20how%20VIP%20(Virtual%20IP)%20and%20DIP%20(Dynamic%20IP)%20work%20because%20the%20official%20doc%20is%20not%20100%25%20accurate%20on%20the%20topic.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EIntroducing%20the%20different%20pricing%20tiers%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20you%20might%20know%2C%20APIM%20comes%20with%20Developer%2C%20Consumption%2C%20Basic%2C%20Standard%2C%20Premium%20tiers.%20Microsoft%20also%20refers%20to%20an%20Isolated%20(in%20preview)%20tier%20on%20its%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fpricing%2Fdetails%2Fapi-management%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Epricing%20page%3C%2FA%3E%20but%20I%20do%20not%20know%20what's%20behind%2C%20so%20let's%20stick%20to%20the%20other%20tiers%20with%20the%20exception%20of%20the%20Consumption%20tier%2C%20which%20I%20will%20park%20since%20there%20is%20nothing%20to%20consider%20network-wise%2C%20other%20than%20the%20fact%20that%20it%20has%20no%20instance-specific%20IPs%20that%20you%20can%20control.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20a%20network%20perspective%2C%20only%20the%20DEV%20and%20PREMIUM%20tier%20integrate%20with%20a%20VNET.%20The%20DEV%20tier%20allows%20customers%20to%20experiment%20with%20VNET%20integration%20but%20is%20not%20covered%20by%20any%20SLA%2C%20while%20the%20PREMIUM%20tier%20is%20covered%20by%20an%20SLA%20but%20comes%20with%20high%20costs%20(about%202500%E2%82%AC%2Fmonth%20for%20the%20first%20gateway%20unit%2C%20a%20few%20hundred%20euros%20for%20the%20next%20units).%20So%2C%20often%2C%20customers%20end%20up%20using%20Premium%20for%20the%20sole%20VNET%20integration%20purpose%2C%20not%20for%20the%20extra%20features%20it%20offers%20(such%20as%20global%20distribution).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20while%20ago%2C%20Microsoft%20also%20came%20with%20the%20self-hosted%20gateway%2C%20which%2C%20as%20the%20name%20indicates%2C%20allows%20you%20to%20host%20a%20gateway%20wherever%20you%20want%20(on-premises%2C%20in%20another%20Cloud%2C%20etc.)%2C%20but%20this%20also%20requires%20the%20premium%20tier.%20Moreover%2C%20the%20self-hosted%20gateway%20targets%20use%20cases%20where%20you%20want%20to%20avoid%20roundtrips%20between%20non-Azure%20data%20centers%20and%20Azure%20with%20the%20exception%20of%20the%20controlplane%2C%20which%20is%20used%20to%20download%20the%20gateway%20config%20(policies%2C%20etc.).%20The%20self-hosted%20gateway%20can%20still%20work%20%22offline%22%20should%20the%20controlplane%20be%20unavailable.%20I%20will%20not%20cover%20the%20self-hosted%20gateway%20in%20this%20blog%20post%2C%20but%20at%20least%2C%20that%20was%20a%20glimpse%20of%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhile%20the%20BASIC%20and%20STANDARD%20tiers%20come%20with%20their%20own%20SLAs%20and%20might%20be%20sufficient%20for%20some%20customers%2C%20they%20cannot%20integrate%20with%20a%20VNET.%20The%20recent%20announcement%20from%20Microsoft%2C%20stating%20that%20Azure%20Private%20Link%20had%20become%20available%20for%20all%20the%20pricing%20tiers%20(except%20Consumption)%2C%20could%20be%20seen%20as%20a%20game%20changer%2C%20but%20it%20is%20really%3F%20That's%20what%20we'll%20see%20in%20the%20next%20sections%20but%20let%20me%20first%20introduce%20the%20DIP%20%26amp%3B%20VIP%20concepts.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EIntroducing%20DIP%20%26amp%3B%26nbsp%3B%20VIP%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20DIP%20(Dynamic%20IP)%20is%20a%20type%20of%20IP%20that%20is%20allocated%20by%20APIM%20itself%20to%20its%20underlying%20machines%2C%20to%20communicate%20with%20backend%20systems.%20A%20DIP%20is%20subject%20to%20change%20because%20it%20is%20not%20static%2C%20and%20is%20Microsoft's%20internal%20kitchen.%20Azure%20will%20take%20any%20available%20IP%20from%20the%20subnet%20in%20which%20APIM%20lives%20when%20it%20needs%20to%20allocate%20a%20new%20DIP.%20If%20you%20have%20several%20gateway%20units%2C%20you're%20likely%20to%20have%20several%20DIPs.%20If%20you%20share%20a%20single%20subnet%20with%20multiple%20APIM%20instances%2C%20they%20will%20all%20allocate%20their%20DIPs%20as%20they%20see%20fit.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOn%20the%20other%20hands%2C%20a%20VIP%20(virtual%20IP)%2C%20is%26nbsp%3Bnot%20subject%20to%20change%20unless%20major%20events%20such%20as%20the%20accidental%20deletion%20of%20the%20IP%20or%20of%20the%20instance%2C%20or%20other%20major%20updates%20such%20as%20the%20integration%20with%20another%20VNET%20occurs%2C%20or%20switching%20from%20Internal%20to%20External%20integration.%26nbsp%3BDepending%20on%20the%20network%20scenario%2C%20APIM%20may%20have%20one%20public%20VIP%20and%20one%20private%20VIP.%20In%20a%20nutshell%2C%20VIPs%20are%20more%20reliable%20than%20DIPs%20because%20they%20are%20expected%20not%20to%20change.%20Public%20VIPs%20can%20be%20used%2C%20only%20under%20certain%20circumstances%2C%20in%20firewall%20rules%20while%20private%20VIPs%20and%20DIPs%20%3CSTRONG%3Eshould%20never%20be%20used%20in%20firewall%20rules%3C%2FSTRONG%3E.%20Instead%2C%20you%20should%20always%20whitelist%20the%20subnet%20in%20which%20APIM%20lives.%20We%20will%20see%20the%20working%20more%20in%20depth%20in%20the%20next%20section%20but%20rule%20of%20thumb%20number%201%20is%3A%20%3CSTRONG%3E%3CEM%3Ealways%20use%20a%20dedicated%20subnet%20for%20a%20single%20APIM%20instance%20%3C%2FEM%3E%3C%2FSTRONG%3Eif%20you%20want%20to%20be%20able%20to%20make%20a%20clear%20segregation%20between%20environments%20(DEV%2C%20TEST%2C%20ACC%2C%20PRD%20if%20you%20stick%20to%20DTAP).%20Let's%20see%20the%20different%20network%20topologies.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EIntroducing%20network%20topologies%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20one%20of%20my%20recent%20articles%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-developer-community-blog%2F10-shades-of-public-api-hosting-on-azure%2Fba-p%2F2989856%22%20target%3D%22_self%22%3E10%20shades%20of%20public%20API%20hosting%3C%2FA%3E%20in%20Azure%2C%20I%20already%20introduced%20a%20few%20concepts%2C%20but%20I%20was%20targeting%20a%20broader%20topic%3A%20web%20landing%20zones.%20Here%20I%20will%20focus%20on%20the%20API%20gateway%20only.%20Let%20me%20start%20with%20the%20first%20and%20easiest%20topology.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EUsing%20non-VNET%20APIM%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20stated%20earlier%2C%20one%20may%20perfectly%20use%20Basic%2C%20Standard%20%26amp%3B%20even%20Consumption%20tier%20if%20we%20do%20not%20need%20to%20integrate%20with%20a%20VNET.%20%3CEM%3EFigure%201%3C%2FEM%3E%20shows%20how%20simple%20this%20could%20be%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22apim-novnet.png%22%20style%3D%22width%3A%20637px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360923iDBE0DC907421E268%2Fimage-dimensions%2F637x433%3Fv%3Dv2%22%20width%3D%22637%22%20height%3D%22433%22%20role%3D%22button%22%20title%3D%22apim-novnet.png%22%20alt%3D%22apim-novnet.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22%20text-align%20%3A%20right%3B%20%22%3E%3CEM%3EFigure%201%3A%20APIM%20-%20No%20VNET%3C%2FEM%3E%3C%2FP%3E%0A%3CP%20style%3D%22%20text-align%20%3A%20left%3B%20%22%3EIn%20this%20topology%2C%20the%20API%20gateway%20is%20exposed%20to%20internet.%20Anyone%20having%20the%20public%20VIP%20and%2For%20the%20public%20DNS%20can%20start%20talking%20to%20it.%20All%20backends%20see%20the%20public%20VIP%20as%20the%20caller%20IP.%20You%20can%20typically%20use%20that%20public%20VIP%20in%20Azure%20Web%20App's%20access%20restriction%20rules%20to%20make%20sure%20backend%20services%20are%20called%20by%20that%20specific%20gateway.%20Note%20that%2C%20as%20stated%20before%2C%20the%20Consumption%20tier%20does%20not%20have%20such%20a%20VIP.%20In%20this%20topology%2C%20there%20is%20no%20DIP%20(or%20at%20least%20not%20that%20we%20can%20see).%20Let%20us%20know%20see%20the%20exact%20opposite%20topology.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%224%22%3EIntegrating%20APIM%20with%20a%20VNET%20in%20internal%20mode%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20topology%2C%20only%20available%20in%20DEV%20%26amp%3B%20PREMIUM%20tiers%2C%20the%20API%20gateway%20is%20not%20exposed%20to%20internet.%20The%20only%20way%20to%20expose%20the%20gateway%20is%20to%20use%20a%20reverse-proxy%20with%20or%20without%20a%20WAF%20module%20(preferably%20with%20a%20WAF).%20It%20has%20a%20system%20public%20VIP%20that%20is%20used%20for%20outbound%20traffic%20only.%20The%20gateway%20is%20part%20of%20a%20private%20network%20perimeter%20and%20can%20be%20reached%20by%20all%20the%20systems%20that%20have%20access%20to%20its%20private%20inbound%20VIP..%20%3CEM%3EFigure%202%3C%2FEM%3E%26nbsp%3Billustrates%20this%20topology%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22apimvnetinternal.png%22%20style%3D%22width%3A%20916px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360912iE8DD315F7DA2C5B6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22apimvnetinternal.png%22%20alt%3D%22apimvnetinternal.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22%20text-align%20%3A%20right%3B%20%22%3E%3CEM%3EFigure%202%20-%20APIM%20in%20VNET%20-%20Internal%20mode%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EFor%20sake%20of%20simplicity%2C%20I%20didn't%20go%20through%20a%20full%20Hub%20%26amp%3B%20Spoke%20setup%20with%20an%20NVA%20and%20custom%20route%20tables.%20I%20only%20use%20Azure's%20system%20routes%20but%20the%20public%2Fprivate%20VIP%20and%20DIP%20behavior%20is%20the%20same%20with%26nbsp%3Bthe%20whole%20shebang.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EFigure%202%3C%2FEM%3E%20covers%20three%20scenarios%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20gateway%20calls%20an%20internet%20facing%20backend%3A%20the%20backend%20sees%20the%20public%20VIP%3C%2FLI%3E%0A%3CLI%3Ethe%20gateway%20calls%20an%20internal%20backend%20within%20the%20same%20VNET%20as%20the%20APIM%20instance%3A%20the%20backend%20sees%20a%20DIP%3C%2FLI%3E%0A%3CLI%3Ethe%20gateway%20calls%20an%20internal%20backend%20in%20%3CSTRONG%3Eanother%3C%2FSTRONG%3E%20VNET%20(peered)%20than%20APIM's%20VNET%3A%20the%20backend%20sees%20a%20DIP%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%20latter%20is%20where%20the%20Microsoft%20doc%20is%20inaccurate%20IMHO%20as%20they%20state%20that%20DIP%20is%20only%20used%20%3CEM%3Ewithin%20the%20same%20VNET%3C%2FEM%3E.%20So%2C%20with%20such%20a%20topology%2C%20remember%20rule%20of%20thumb%20number%201.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%224%22%3EIntegrating%20APIM%20with%20a%20VNET%20in%20external%20mode%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20topology%20is%20very%20similar%20to%20the%20previous%20one%20except%20that%20there%20is%20no%20more%20private%20VIP.%20%3CEM%3EFigure%203%3C%2FEM%3E%20illustrates%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22apimvnetexternal.png%22%20style%3D%22width%3A%20916px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360925i882525729C01CF41%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22apimvnetexternal.png%22%20alt%3D%22apimvnetexternal.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22%20text-align%20%3A%20right%3B%20%22%3E%3CEM%3EFigure%203%20-%20APIM%20in%20VNET%20-%20Internal%20mode%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20same%20scenarios%20as%20with%20the%20previous%20topology%20are%20covered%20and%20the%20same%20behavior%20is%20observed.%20So%2C%20here%20again%2C%20rule%20of%20thumb%20number%201%20also%20applies.%20Let%20us%20know%20see%20the%20Private-Link-enabled%20APIM.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%224%22%3EUnderstanding%20APIM%20with%20private%20link%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EI%20will%20not%20explain%20how%20the%20whole%20private%20link%20story%20works%20because%20it%20is%20already%20broadly%20covered%20by%20the%20official%20documentation.%20However%2C%20when%20I%20saw%20this%20announcement%2C%20I%20was%20really%20puzzled%20about%20its%20added%20value.%20To%20make%20sure%20there%20was%20no%20magic%20trick%20(specific%20to%20APIM)%2C%20I%20quickly%20created%20a%20lab%20to%20test%20the%20thing%20out.%20After%20my%20tests%20(03%2F2022)%2C%20I'm%20still%20puzzled.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20a%20nutshell%2C%20private%20link%20works%20like%20this%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EYou%20enable%20it%20for%20a%20public%20PaaS%20service.%20By%20enabling%20private%20link%2C%20you%20must%20choose%20the%20subnet%20in%20which%20the%20private%20endpoint%20(private%20IP)%20must%20be%20created.%20Note%20that%20you%20can%20have%20multiple%20private%20IPs%20for%20a%20single%20PaaS%20instance.%20There%20is%20a%20whole%20setup%20to%20do%20with%20DNS%20to%20make%20this%20work%20fine%2C%20which%20I'll%20skip%20as%20it%20is%20not%20relevant%20here.%3C%2FLI%3E%0A%3CLI%3EAfter%20having%20performed%20the%20previous%20step%2C%20you%20end%20up%20with%20a%20private%20inbound%20IP.%20With%20some%20services%20(such%20as%20Azure%20SQL%2C%20Azure%20Storage%2C%20etc.)%20you%20can%20keep%20using%20both%20the%20public%20endpoint%20and%20your%20private%20endpoint(s).%20With%20some%20others%20such%20as%20Azure%20App%20Service%2C%20enabling%20private%20link%20automatically%20denies%20all%20public%20traffic.%20For%20APIM%2C%20the%20public%20VIP%20is%20still%20accessible%20by%20default%20but%20can%20be%20disabled%20through%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapi-management%2Fprivate-endpoint%23optionally-disable-public-network-access%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAPI%20call%3C%2FA%3E.%20I'm%20not%20sure%20whether%20this%20is%20already%20feasible%20to%20disable%20it%20in%20one%20go%20using%20ARM%20or%20Terraform.%3C%2FLI%3E%0A%3CLI%3EFor%20whatever%20service%20(thus%20including%20APIM)%2C%20private%20link%20%3CSTRONG%3Eonly%20impacts%20the%20inbound%3C%2FSTRONG%3E%20traffic%2C%20not%20the%20outbound%20one.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWhat%20the%20latter%20means%20is%20that%20you%20can%20access%20to%20a%20PaaS%20service%20privately%20but%20it%20does%20not%20mean%20that%20this%20service%2C%20can%2C%20in%20turn%2C%20access%20other%20private%20backends.%20A%20good%20example%20of%20this%20is%20with%20Azure%20Web%20Apps.%20if%20you%20enable%20private%20link%20for%20a%20given%20web%20app%2C%20you%20will%20be%20able%20to%20access%20it%20privately%20but%20you%20also%20need%20to%20leverage%20the%20VNET%20integration%20feature%20for%20the%20outbound%20traffic%2C%20so%20that%20the%20web%20app%20can%20in%20turn%2C%20talk%20to%20private%20backends%20such%20as%20for%20example%20an%20Azure%20SQL.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EFigure%204%3C%2FEM%3E%20illustrates%20this%20topology%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22apimplink.png%22%20style%3D%22width%3A%20794px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360931i40F014DEEA91A689%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22apimplink.png%22%20alt%3D%22apimplink.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22%20text-align%20%3A%20right%3B%20%22%3E%3CEM%3EFigure%204%20-%20Private-Link-enabled%20APIM%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3ESo%2C%20if%20you%20patch%20your%20instance%2C%20you%20can%20isolate%20it%20from%20internet%20but%20you%20can%20only%20talk%20to%20public%20facing%20backends.%26nbsp%3BGiven%20the%20fact%20that%20the%20primary%20role%20of%20an%20API%20gateway%20is%20to%20proxy%20traffic%20between%20API%20consumers%20and%20actual%20backends%2C%20I%20would%20have%20expected%20Microsoft%20to%20give%20us%20something%20to%20manage%20outbound%20traffic.%26nbsp%3B%20It%20turns%20out%20that%20with%20a%20Private-Link-enabled%20APIM%20(in%2003%2F2022)%2C%20we%20end%20up%20with%20a%20private%20inbound%20IP%20for%20our%20gateway%20but%20we%20can%20only%20talk%20to%20public%20backends%20because%20there%20is%20not%20(yet%3F)%20a%20way%20to%20manage%20the%20outbound%20traffic...So%2C%20this%20is%20a%20niche%20scenario%2C%20where%20you%20only%20want%20to%20allow%20trusted%20parties%20(first%20or%20third)%20to%20consume%20your%20gateway%2C%20at%20an%20affordable%20cost.%20In%20conclusion%2C%20this%20is%20in%20no%20way%20comparable%20with%20a%20true%20VNET%20integration.%20Note%20that%20I%20numbered%20the%20rule%20of%20thumb%20number%201%20because%20here%20is%20another%20rule%20thumb%20(number%202)%3A%20the%20Cloud%20is%20a%20moving%20target%20so%20if%20you%20read%20this%20blog%20post%20a%20few%20months%20after%20its%20publication%2C%20review%20carefully%20that%20what%20I%20stated%20here%20is%20still%20valid.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-3274323%22%20slang%3D%22en-US%22%3E%3CP%3EMicrosoft%20recently%20announced%20the%20availability%20of%20private%20link%20for%20Azure%20API%20Management.%20It%20is%20an%20opportunity%20to%20review%20our%20options%20in-depth%20and%20to%20explain%20the%20network%20behavior%20(VIP%20%26amp%3B%20DIP)%20of%20the%20different%20flavours.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Apr 03 2022 07:52 AM
Updated by: