Is Google Cloud Endpoints equivalent to an API Gateway, or are Endpoints equivalent to a microservice?

Viewed 2260

Using the App Engine Flexible Environment, I'm preparing to deploy an Angular 4 client and am looking into Cloud Endpoints to handle my node.js/express microservices as it seems to simplify securing and authenticating endpoint requests, and I wanted to clarify a few things:

  1. Do I use cloud-endpoints as an API Gateway which routes requests to the individual microservice backends or are the microservices supposed to be built as individual endpoints-apps themselves?

  2. Do I host the Angular 4 app statically (server agnostic), and make endpoint requests directly to the Gateway/microservice from the ng client, or is the app hosted through a server framework (e.g. node.js/express) which then passes on the request along to the Gateway/microservice

2 Answers

Endpoints is an API gateway, but it currently only routes to a single backend. On Flex, it's whatever app you deploy. The Endpoints proxy sits in front of your backend, transparently to the client, and the client requests will pass through the gateway. See the docs for how to set up your Flexible environment.

  1. In conjunction with a dispatch.yaml directive to handle routing, you can use GCE as a gateway to multiple microservices running as services in a given project.

  2. You can call the services directly or proxy through a server.

Related