Best Practice

Azure API Management

Introduction

During the last few years the API Ecosystem has grown significantly. This has been driven by demand for data and services in the Digital economy. We live in an interconnected world with billions of mobile devices. The internet has evolved with social media apps like Facebook, Twitter and many more. With this proliferation of devices and apps the number of APIs has grown significantly. As a result, organisations need a way to manage the lifecycle of these APIs.

What is API Management

As more and more APIs are developed and deployed on the Internet and inside organisations it has become important to manage the whole life cycle of an API. API Management enables both developers and architects to manage the key stages of an API as it designed, published and shared with its consumer base. Key aspects of security, documentation, API growth and other important requirements can all be managed with API Management.

What key features does API Management offer?

API management service can offer a multitude of features. However, it is important that they offer an environment that makes designing, deploying and managing the API easier. But more specifically you want your API management to offer the following:

  • API Gateway. A Gateway server that allows controlled access to backend services, enforcing throttling and security policies.
  • Documentation and Publishing Tools.
  • Access Portal. Central point for developers to manage API keys, documentation, SDKs.
  • Reporting and Analytics. Monitor usage and report on trends.

Introducing Azure API Management

Azure API Management 

Azure API Management offers a turnkey solution to enable publishing APIs to external and internal customers. The Azure API Management offering is split into three parts:

  • Developer Portal
  • Gateway
  • Publisher Portal

Developer portal

The developer portal is where API developers can access their published APIs. Developers can:

  • Read automatically generated API Documentation, for example access Swagger Open API. metadata or a WADL document (XML).
  • Access code samples for accessing the API in languages such as Java, C# and more.
  • Customize the portal theme.
  • Developer support. Log bugs/issues with the API.

API Gateway

An API Gateway is a server(proxy) endpoint that sits in front of your backend services. Its main purpose is to secure access by:

  • Throttling API requests trough usage quotas and limits.
  • Support for multi region deployment.
  • Access control of API keys, and other credentials such as certificates, JWT token validation.
  • Cache responses.
  • Logging of analytics data.

Administration Portal

The publisher portal provides an administrative interface to manage your API program. It provides the key features such as:

  • Dashboard. View your published APIs, trends and health.
  • Products. Manage APIs as a product.
  • Manage and implement policies such as rate throttling.
  • Developers. Add and remove users.
  • Analytics. Monitor API usage and Health.

Scaling you API

One of the benefits of Azure is you can have the opportunity to expand your APIs by leveraging the scaling capability. API Management uses the concept of scale units. These are dedicated scale resources per service tier. This enables you to plan for capacity by knowing what each tier can support.

Pricing Tiers

Azure API Management uses a billing unit based on per hour consumption of the API. This varies in price from £0.05/hour for the development tier up to £2.86/hour for Premium usage.

Azure API Management is offered in the following tiers:

  • Developer. £0.05/hour. No Sla. No Multi region deployment. Non-production use case. Use for evaluation and testing. Maximum throughput of 500 requests/sec. 1 scale unit.
  • Basic. £0.16/hour. Entry level production use. Guarantees 99.9% SLA. Maximum throughput of 1000 requests/sec. 2 scale units.
  • Standard. £0.71/hour. Use for medium level production use cases. Guarantees 99.9% SLA. Maximum throughput of 2500 requests/sec. 4 scale units.
  • Premium. £2.86/hour. Multi region deployment. High volume use cases. Supports 99.95% SLA. 10 scale units per region (call support to add more). Maximum throughput of 4000 requests/sec.

For further information and prices per region, please visit here

The key points to consider when planning the capacity is what workloads do you expect and how you anticipate your API to grow.

You can monitor your APIs in Azure using metrics. In your API instance in Azure navigate to the Metrics blade. Select Capacity metric from Available metrics. See the following screenshot:

Azure API Management 2 

There is a big jump from Standard tier to Premium as it offers the double the scaling capability. If you require Multi region deployment, then this is only available in Premium tier. If you want to explore and test, then the Developer tier should cover your needs.

Conclusion

Azure API Management offers an end to end solution for managing the lifecycle of your APIs. If you are starting your API journey and want a simplified and streamlined approach to API setup and management then it offers a good choice. You can also have the opportunity to integrate it with other APIs you have developed and hosted in Azure. If you want to plan for scale, you can select the appropriate tier to support your expected workloads.