Azure vs GCP part 16: Managing APIs
Tags: azure, gcp, cloud
Published: 2018-03-30 09:06:24

---
title: "Azure vs GCP part 16: Managing APIs"
published: true
description: In this series, I compare Azure and GCP as C# developer
tags: azure,gcp,cloud
cover_image: https://thepracticaldev.s3.amazonaws.com/i/m57mmv4hgz9xrskaital.PNG
---

So far, I compare Azure vs GCP as c# developer point of view for:

- Web Apps/App Engine
- VMs
- Function
- Container management

In this article, I look into Managing API capabilities.

# Why managing API important

Because I said so! Well, no, not really. 

It is an obvious trend what we write a bunch of APIs to expose data and services so that other guys can consume it. Yes it is a good thing!! However, it also introduces new challenges.

- Each API may have different way to consume. Protocol, format, naming etc.
- Common features such as Authentication, monitoring, performance tuning needs to be done in multiple places.
- Too difficult to discover all available APIs as they run on separate places as no central documentation.

This is why I need API orchestration feature.

# Azure API Management

API Management service is the answer from Microsoft Azure, which provides following features.

- Routing: Receive requests from outside to back-end services.
- Custom Domain: Provide single endpoint for all back-end APIs with custom domain.
- Authentication: Manage users, and authenticate client by API key, JWT Token, certs etc
- QoS: Limit and quote services by policies.
- Modify: Modify requests from outside or responses from back-end.
- Cache: Caching content.
- Logs: Log many things and get insights.
- Portal: Be able to provide custom Developer portal for developers.
- Open API Definition: Define and provide swagger via import, auto detect and manual configuration
- Scaleability: Be able to scale in one or multiple regions.
- Availability: Be able to backup and restore the service in case of Disaster.
- API Life-cycle: a.k.a versioning.
 
# GCP Cloud Endpoints

Google also provides API management Service, Cloud Endpoints. It offers very similar capabilities as Azure API management, with easy integration with GCP services.

![arch](https://cloud.google.com/endpoints/docs/images/endpoints_arch.png)

# Summary

### What developers should understand

I, as a developer, should focus on business logic when writing API, but I cannot leave other tedious, yet important things such as security and logging. 

Developers need to understand which area API management services cover so that we don't have to implement such features to each APIs. I strongly recommend put one of the APIs behind the API management services, and delegate some of the functions to it for test.

### Which service to use

This is a huge topic to compare, as it provides so many capabilities. To tell you the truth, I started writing how to use part as well for each services, and realize it takes several weeks to complete. However, it is natural to use the one from the platform you are working on. Good new is that both cloud provider offers this important capabilities.

# Reference
[API Management documentation](https://docs.microsoft.com/en-us/azure/api-management/)
[API implementation](https://docs.microsoft.com/en-us/azure/architecture/best-practices/api-implementation?toc=%2Fazure%2Fapi-management%2Ftoc.json)
[Cloud Endpoints Architecture](https://cloud.google.com/endpoints/docs/openapi/architecture-overview)