DEV Community

Difan Chen
Difan Chen

Posted on

API Gateway

What is API Gateway

An API Gateway is an API management tool that sits between a client and a collection of backend services. An API gateway acts as a reverse proxy to accept all application programming interface (API) calls, aggregate the various services required to fulfill them, and return the appropriate result.

Why using it

  • Abstraction level for the clients. With microservice architecture, if you add some API services and retire others, clients can still find all your services in the same place.
  • Protect your APIs from overuse and abuse.

What public clouds offers

Amazon API Gateway

Alt text

Uisng Amazon API Gateway, you can create RESTful APIs and Websockets APIs. AWS provides benefits like monitoring (integrates with Amazon CloudWatch), authentication, authorization, throttling, etc. With an API Requests price as low as $0.90 per million requests at the highest tier.

GCP API Gateway

GCP provides API gateway service, which can create, secure and monitor APIs for Google Cloud serveless backends, including Cloud functions, Cloud Run and App Engine. Looks like the supported services behind the api gateway are still limited.

The billing model is similar to AWS, which is charged by number of API calls. The price seems to be cheaper than AWS gateway though.

API calls per month per billing account Cost per million API calls
0-2M $0.00
2M-1B $3.00
1B+ $1.50

Open source solutions

Kong Gateway

Kong Gateway is the most popular open-source cloud-native API gateway built on top of a lightweight proxy. It is written in Lua running with the help of the Nginx.

Tyk

Tyk is an enterprise-ready open-source API gateway. You have an option to either go for self-hosted or managed.

Goku

Goku API Gateway is an umbrella project of EOLINK Inc. It is a Golang-based microservice gateway that enables high-performance dynamic routing, service orchestration, multi-tenancy management, API access control, etc.

Discussion (0)