Caching of Google Cloud Endpoints?

2019-06-02 22:22发布

问题:

Will requests to Cloud Endpoints get cached?

The official docs are a little light on this matter. The docs read:

Cloud Endpoints uses the distributed Extensible Service Proxy to provide low latency and high performance for serving even the most demanding APIs. [...] and can be used with Google App Engine, Google Container Engine, Google Compute Engine or Kubernetes.

A 'distributed extensible service proxy' makes me think the Endpoint is distributed to the edge nodes for faster responses, but the docs don't specifically state this.

We can use Cloud CDN to cache requests from GAE, Compute and Container Engine. Endpoints can be used with all those. This makes me wonder if there's some magic in the background with CDN+compute to cache the Endpoints responses. Again, the docs are a little light on this.

Has anyone figured this out? Thanks!

回答1:

Great question! The Extensible Service Proxy (ESP) does not perform request caching. Its function is to intercept incoming requests, validate auth tokens, and then forward the request to Google Service Control where additional API Management rules are applied as defined in your Open API spec. Endpoints uses a distributed proxy model for better performance, to avoid the extra network hop that's typically incurred with a traditional multi-tenant API proxy. This is in fact the same model used internally within Google to power our own APIs.

Please let us know if you have anymore questions!