4

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

yoonjesung
  • 958
  • 1
  • 6
  • 20

2 Answers2

4

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.

saiyr
  • 2,535
  • 1
  • 9
  • 13
  • So, to have a microservices architecture with endpoints, I would need to create multiple endpoint-applications, each which act as their own gateway to serve their own backend service? – yoonjesung Sep 28 '17 at 20:39
2
  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.