GCP API Service ( Cloud Endpoints, API Gatway, Apigee) - ghdrako/doc_snipets GitHub Wiki

The main service offerings for API management on GCP are:

  • API Gateway,
  • Cloud Endpoints, and
  • Apigee.

Cloud Endpoints

Cloud Endpoints is a distributed API management system that provides an API console, hosting, logging, monitoring, and a few other features to manage and secure APIs. It's a service proxy that uses Google's general-purpose Extensible Service Proxy (ESP), based on NGINX or the newer ESPv2 (open sourced at https://github.com/GoogleCloudPlatform/esp-v2), which is based on Envoy (https://www.envoyproxy.io/docs/envoy/latest/). With ESPv2, you can use Cloud Endpoints with any GCP compute service. When run with Kubernetes Engine, it gets deployed as a side-car container in front of the API service application container. To understand more about the Cloud Endpoints architecture, refer to https://cloud.google.com/endpoints/docs/openapi/architecture-overview.

API Gateway

API Gateway is a fully managed and serverless solution that provides a single interface and secure access for multiple backend services. You start with an API configuration, where you define a publicly available API endpoint that clients use and a backend endpoint that the API uses to connect to backend services. The gateway is an Envoy-based, scalable proxy that hosts the deployed API config. This service was created to provide a more seamless API management experience. For example, with the following three simple steps, an API Gateway instance can be created to manage the APIs of our microservices deployment from the previous section:

  1. Enable the service's API on GCP and create a gateway resource.
  2. Upload an Open API 2.0 specification file with the gateway's address in the host field.
  3. Deploy the API specification to the gateway. As a result, navigating to the gateway's address (a public DNS name), and appending the / orders or /products paths will route you to the corresponding service. The following screenshot shows the API gateway's response after calling the /orders API:

This is the simplest use case of the API Gateway pattern, that of request routing. It's worth noting that the specification doesn't accept IP addresses for the backend hosts, so a public DNS name must be created for the services' endpoints (which I did for this example using my domain registrar).

Apigee

It is a more comprehensive solution for API management, geared for large enterprise customers (and not free, like the other two services). It contains more advanced features, such as a customizable portal for onboarding partners and developers as well as monetization and analytics capabilities. Security features are also more robust. Moreover, the runtime plane can be extended to on-premises or another cloud provider environment to support hybrid scenarios. To learn more about Apigee, check out the documentation at https:// cloud.google.com/apigee/docs. It's possible to request a demo from Google sales before committing to purchasing it. If your use cases are simpler, API Gateway is likely to be a more cost-effective solution with a significantly smaller learning curve. However, if you're more serious about API management and APIs have higher complexity and business criticality in your organization, Apigee is a powerful platform well worth exploring.