'Benefits of using Cloud Endpoints

I am searching for the benefits of using Cloud Endpoints.

Why should I use Cloud Endpoints if I am also able to generate a server stub from my openApi definition which handels request validation, authentication and routing?

I hope that question is not too silly. I really struggle to find a clear answer.

Greetings



Solution 1:[1]

Let me describe my API journey on GCP to demonstrate how I ended up with Endpoints.

In the first API project we had different java backends with REST/swagger/openapi annotations, and used a servlet filter to do JWT verification. As we grew, we encountered problems with consistent API experience as we deployed different application versions and non-java (python) backends. Additionally each backend service had growing non-application complexity in authing different types of JWT. This in-turn led us to upgrade everything together (the well known distributed monolith anti-pattern), and led to an increasing barrier to adopting non-java backends.

In my next API project (different place), we deployed grpc with the Endpoints/ESP sidecar in front. The ESP did consistent JWT auth, and grpc to REST transcoding, and provided API metrics direct to Stackdriver. I see you mention OpenAPI not grpc but the principle holds. The sidecar gives you consistent experience, allows less complexity in the backend/app process and opens up the rest of GCP stackdriver tracing/metrics.

Solution 2:[2]

I've gone through the same review process trying to find the best API Gateway that could provide: Security, Monitoring and Logging.

In summary, GCP offers 3 API related services: API Gateway, Cloud Endpoints and Apigee.

p.s. API Configuration must be done through OpenAPI Spec

  • API Gateway is a self-managed/ pay-as-you-go solution that offers basically: Control API security (by managing API keys inside GCP or any other authentication method), Monitor API usage using built-in dashboard and/or API Logging. What you can't do: Configure custom Quota per client

  • Cloud Endpoints offers everything that API Gateway does, but as an open source / Cloud Run hosted solution - meaning you won't be charged per use (only for hosting it), plus, it provides the ability to configure custom Quotas per client.

  • Apigee is an enterprise-graded API management solution (and expensive) that would provide you more functionally when handling your API lifecycle.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Caio Pizzol