Loading...

Traffic Manager Integration with Azure API Management - 404 resource not found error

Traffic Manager Integration with Azure API Management - 404 resource not found error

To implement disaster recovery and high availability for API backends we can either place traffic manager or front door services in front of APIM.

 

Traffic Manager is a DNS based global load balancing solution. It is accessed via the http://<domain>.trafficmanager.net URL.

Most often users comes across the following issue during Traffic Manager implementation

{

    "statusCode": 404,

    "message": "Resource not found"

}

The above is because Traffic Manager is not able  to handle layer 7 traffic correctly.

 

This article provides step by step guidance on Traffic manager for managing disaster recovery of APIs across two regions.

We have used APIM premium SKU with gateway deployed in Central India and South India regions as shown in the screenshot below

PrachiTrivedi_0-1694145780379.png

Configure Inbound Routing Policy in the API definition created inside APIM and specify the regional backend URLs of your APIs. This is required for APIM to internally manage the routing.

PrachiTrivedi_6-1694145780454.png

 

As a next step create a Traffic Manager profile and configure the Central India and South India APIM gateway URLs as backend endpoints .

PrachiTrivedi_2-1694149264186.png

 

PrachiTrivedi_1-1694145780390.png

 

PrachiTrivedi_2-1694145780398.png

Configure the APIM healthcheck URLs in Traffic Manager configuration navigation to ensure the endpoints are running healthy.

PrachiTrivedi_3-1694145780414.png

 

For Traffic Manager to effectively route traffic to APIM endpoints you need to first create a certificate for the complete Traffic Manager domain name "<domain>.trafficmanager.net"

You can use utility such as “mkcert” to generate a certificate file. Use the versions appropriate to your operating system.

PrachiTrivedi_4-1694145780424.png

 

Rename the .p12 certificate file  .pfx and save it in a secured location. Note the password generated in the above process.

 

Now associate this certificate with APIM custom domains.

Navigate to APIM->Custom domain and click the add button.  Type the traffic manager DNS name in the hostname section and chose certificate type as custom. Select the certificate from the saved location and provide the certificate password (generated at the time of creating the certificate). Select  “Default SSL Binding” checkbox and save the settings.

PrachiTrivedi_5-1694145780435.png

Now open a new browser session and type in the traffic manager URL of your API application and it will get routed by the API management to the correct regional endpoint.

 

Successful routing to primary region as shown below

PrachiTrivedi_7-1694145957279.png

Successful routing to secondary region as shown below

PrachiTrivedi_8-1694146000735.png

 

Published on:

Learn more
Azure Infrastructure Blog articles
Azure Infrastructure Blog articles

Azure Infrastructure Blog articles

Share post:

Related posts

Azure Lab Services - Lab Plan Outage

Azure Lab Services is currently experiencing an outage that affects Lab Plans, but not Lab Accounts. This outage intermittently impacts all op...

7 hours ago

Azure Cosmos DB Conf 2024: Accelerating Innovation in AI and Data

The fourth annual Azure Cosmos DB Conf held on April 16, 2024, was a highly anticipated event for those at the forefront of cloud data managem...

8 hours ago

New ‘ExecutionMetrics’ event in Azure Log Analytics for Power BI Semantic Models

The Power BI integration with Azure Log Analytics has been enhanced through the introduction of a new event known as ‘ExecutionMetrics&#...

12 hours ago

Two options for Invoice Processing in Power Platform | AI Builder or Azure Document Intelligence

If you're looking to process invoices within the Power Platform, this tutorial will provide you with valuable insights into the available opti...

16 hours ago

Azure Communication Services May 2024 Feature Updates

The Azure Communication Services team is excited to share several new product and feature updates released in April 2024. (You can view previo...

3 days ago

Azure Communication Services at the European Cloud and Collaboration Summits

If you're interested in Azure Communication Services, mark your calendar for the upcoming European Cloud and Collaboration Summit from May 14-...

3 days ago

Why CIOs Prefer Azure DevOps for Custom Development Projects

In today's fast-paced business environment, organizations require an IT infrastructure that can deliver agility, innovation, and speed to succ...

3 days ago

Power Platform – Customer-Managed Key (CMK) encrypted with Azure Key Vault Managed HSM key is now available

If you're a Dataverse user and interested in enhancing the security of your data, this announcement will be of particular interest to you. As ...

3 days ago

Crafting Future-proof Apps with JavaScript & Azure Cosmos DB | Azure Developers JavaScript Day 2024

  Continuing with a series of articles about the Azure Developers JavaScript Day 2024, Sajeetharan Sinnathurai a Principa...

4 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy