Introduction
The use of Application Programing Interface (API) are common nowadays for may reasons. Service exposure, integrations with third party organizations, modernizations, are some common use case of API's. Migrating a monolithic application to a distributed system such as microservices is also a common use case of API's.
Figure 1 has an example of a monolithic application that interacts with a service layer and database. In many cases to expand the consumers of this application the creation of multiple services becomes necessary and the use of more than one API may also be necessary.
Figure 1 - Monolithic and Distributed System |
Therefore many organizations may choose to implement multiple API's and expose them to multiple consumers. A distributed system in these cases may be a solution to contextualize API's as the business grows.
Handling Multiple API's
The growth of the number of API's can cause more complexity in a sense of handling these API's. API's needs to be exposed and may have distinct end-points, they might have many types of authentication, caching and logging errors can be a difficult task.
Figure 2 - Handling multiple API's |
Figure 3 illustrates an example of 3 different API's with distinct authentication and end-points. Consuming these API's can create more complexity to the consumers due to many types of authentications and multiples end-point prefixes.
Figure 3 - Exposure and Authentication |
Why Azure API Management
The use of Azure API Management (APIM) can facilitate the management of multiples API's within an organization. APIM acts as a proxy to multiple back-end API's. The consumers doesn't call the back-end API's directly, they call the APIM end-point and it routes back to the API's.
Figure 4 - Azure API Management (APIM) |
Benefits of APIM
There are several of benefits to using APIM:
- It facilitates the client consumption to API's through portals and resources.
- Allows Azure Active Directory integration for B2B and B2C.
- Has throttling configuration to avoid the abuse of API calls.
- Contains Policies with resources such as mocking, response caching, etc.
Figure 5 - Benefits of APIM |
APIM Resources
The main resources available in APIM are the API Gateway, Azure Portal and Developer Portal. Figure 6 contains details of these resources.
Figure 6 - APIM Resources |
API Gateway, Azure Portal and Developer Portal
The API gateway Receives API requests and routes them to the back-end. It also Authenticate to the back-end API. It allows configurations such as limitations to API calls and cache responses from back-end API’s. Figure 7 contains some details of the routing from consumer to the back-end API's.
Figure 7 - API Gateway |
The azure portal allows you to Import and configure new API’s, Configure policies for the API’s, Setup user access and many other configurations.
The developer portal allows access to the API documentation. It enable login to account and access API Keys. It also permits testing the API's via web interface.
Conclusion
There are many other configurations and resources that APIM has to offer such as products, subscriptions, groups, policies, etc. The goal of this introduction was to help you understand the basics of APIM and why some organizations might choose APIM as an API gateway.
Top comments (0)