Using The Azure API Management Service

Introduction

Today, we will look at the Azure API Management service and how we can use it to improve our API application design. In my previous article, we looked at the layout of a basic web application as per the architecture on Microsoft’s website. Now, we look at another architecture proposed by Microsoft related to using the Azure API Management service.

Reference diagram

We will start with the diagram provided by Microsoft. Details are available on the Microsoft website below:

https://learn.microsoft.com/en-us/azure/architecture/example-scenario/apps/apim-api-scenario

Using the Azure API Management service

Components of the design

This architecture diagram shows how we can migrate a web application from on-premises to the cloud and also add a service called API Management.

On the left side, we see a typical on-premises application where the user accesses a browser based web application that talks to existing HTTP API service via rest API or some other method. On the right side, we see a similar could implementation in Azure, where the user accesses the same application deployed in the Azure cloud. This would probably be using an Azure App Service. This App service then accesses a new API service (again deployed as an Azure App Service) or the on-premises web API via the API Management service.

The core feature here is the API Management service. You can read more about this service here. However, a brief summary is that this acts as a reverse proxy and provides features like security, caching, message translation, and logging, all from a central location.

Two things I would like to add to this diagram would be the below,

  1. Azure monitor and diagnostic settings for the API Management service
  2. Application Insights for detailed instrumentation of the App services and if possible, to the on-premises web applications

Summary

In today’s article, we looked at how we could possibly architect a web application and web API on the Microsoft Azure cloud platform and use the API Management service to control access to the API service both on the cloud and on-premises. We started with the diagram provided on Microsoft’s official site and added a few components I thought would be useful. Please note that these are suggestions and would vary depending upon the situation, requirement, and of course budget.