ESPv2 or API Gateway?

1,728 views
Skip to first unread message

Denis Rhoden Jr

unread,
Feb 9, 2021, 5:15:27 PM2/9/21
to Google Cloud Endpoints
Greetings,

I've been following the team's work for several months (thank you) and I was curious about this: https://cloud.google.com/api-gateway/docs/get-started-cloud-run-grpc. Whose instructions look similar to this: https://cloud.google.com/endpoints/docs/grpc/get-started-cloud-run

I am about to dive into a project and want to know which one to choose.

Regards

Denis

Wayne Zhang

unread,
Feb 9, 2021, 5:23:24 PM2/9/21
to Denis Rhoden Jr, Google Cloud Endpoints
The main differences are: 
* api-gateway is Google managed, vs Cloud Endpoint is you managed;  you have to deploy ESPv2 proxy by yourself.  
* api-gateway only supports App deployed at serverless platforms, such as Cloud Run, Function, and app engine. Cloud Endpoint supports GKE and GCE addition to serverless platforms. 

Denis Rhoden Jr

unread,
Feb 9, 2021, 6:04:26 PM2/9/21
to Google Cloud Endpoints
Excellent. Thank you for this context.

Denis Rhoden Jr

unread,
Feb 9, 2021, 6:06:24 PM2/9/21
to Google Cloud Endpoints
Are there any specific differences for CORS or authentication that someone coming from ESPv2 should be aware of? Typically CORS config is set in the image, I am not sure how to approach that given the documentation for API gateway.

Wayne Zhang

unread,
Feb 9, 2021, 6:57:43 PM2/9/21
to Denis Rhoden Jr, Josh Einhorn, Google Cloud Endpoints
Added Josh.  

If a ESPv2 feature is enabled by the start up flag, api-gateway may have to re-implement it in the service config.  E.g.  ESPv2 CORS related flags. Josh can add more details on this.

Thanks.
-Wayne

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/c837243f-d83f-4d89-b5b0-43eb0fcc2147n%40googlegroups.com.

Josh Einhorn

unread,
Feb 9, 2021, 10:41:52 PM2/9/21
to Wayne Zhang, Denis Rhoden Jr, Google Cloud Endpoints
You're correct that there's currently no way to configure API Gateway to respond directly to the CORS header requests without passing through to your application. Support for this via the API Gateway service will be coming in approximately Q2.

You can technically work around this by handling the OPTIONS header requests in your backend application, though this is clearly not a desirable experience. Please let me know if you have any other questions or want assistance with the workaround.

Denis

unread,
Feb 10, 2021, 12:04:47 AM2/10/21
to Josh Einhorn, Wayne Zhang, Google Cloud Endpoints
Thanks for getting back to me. I will scaffold a demo of what i tried and share a link in the thread. 

Oscar Söderlund

unread,
Feb 26, 2021, 11:38:50 AM2/26/21
to Google Cloud Endpoints
> You're correct that there's currently no way to configure API Gateway to respond directly to the CORS header requests without passing through to your application. Support for this via the API Gateway service will be coming in approximately Q2.
>
> You can technically work around this by handling the OPTIONS header requests in your backend application, though this is clearly not a desirable experience. Please let me know if you have any other questions or want assistance with the workaround.

Thank you for the additional context Josh, that's super helful!

This is currently a blocker for us to adopt API Gateway, since we intend to use it for JSON transcoding between web clients and our Cloud Run / gRPC microservice backend. We are really excited about CORS support for the API Gateway, so that we can move forward with this adoption. Very excited about this product overall.

Is there already a public issue tracker ticket for CORS support in API Gateway? Otherwise, we'd be happy to create one so that we can move forward with our adoption ASAP when it's available.

Josh Einhorn

unread,
Feb 26, 2021, 3:08:19 PM2/26/21
to Oscar Söderlund, Google Cloud Endpoints
Is there already a public issue tracker ticket for CORS support in API Gateway? Otherwise, we'd be happy to create one so that we can move forward with our adoption ASAP when it's available.

Not to my knowledge no; if you do create one please let us know! Thanks!

-Josh



--
Josh Einhorn | Software Engineer | joshe...@google.com | 1-215-837-1102

Oscar Söderlund

unread,
Apr 18, 2021, 11:40:48 AM4/18/21
to Google Cloud Endpoints
Hi Josh!

We've created a ticket on the issue tracker here:

Cheers!

Reply all
Reply to author
Forward
0 new messages