Single API with multiple backends with x-google-backend on GKE

716 views
Skip to first unread message

Vojko

unread,
Mar 22, 2020, 4:05:23 PM3/22/20
to Google Cloud Endpoints
Hello,

We're in the process of setting up ESP with multiple backends. So far we used ingress with paths to differentiate between backend services.




For the future we'd like to implement single ESP that would handle multiple backends. That way we would have a single API that would be processed by multiple backends.



Our attempted solution was to create single OpenAPI specification which would define x-google-backend for different paths in the specification. The idea was that (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-backend) "Whenever your API targets multiple backends." works that way.

We are currently getting different errors when trying to implement this (400 Request Header Or Cookie Too Large, ...). So before going into details, is such a solution possible and is our approach correct? Is there an example of using x-google-backend implemented for GKE?

Thank you and regards, Vojko.

Jilin Xia

unread,
Mar 22, 2020, 4:31:20 PM3/22/20
to Vojko, Google Cloud Endpoints
Hi, Vojko:

    Thanks for interest.

    For ESPv1, we don't officially support ESPv1 on GKE, with x-google-backend.  so, two options:

    1,  Deploy ESPv2 on Cloud Run as an API Gateway, if you still get problems, you can file bugs to us.
    2,  Wait for ESPv2 on GKE launch (should be in Q3, 2020), with x-google-backend support.

Please understand that we have limited resources, so we need to prioritize our work for best customer supports.

Regards
Jilin


--
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/b68e9ea9-5aa8-4a3a-93b0-4c1a32080ab8%40googlegroups.com.


--

Jilin Xia

jili...@google.com

Senior Software Engineer


Vojko

unread,
Mar 26, 2020, 11:06:42 AM3/26/20
to Google Cloud Endpoints
Hi Jilin,

Thanks for your reply.

Add 1.) The way we currently understand it, if we go with Cloud Run (fully managed) we cannot reach backend services running on GKE without them being exposed publicly. Which we will not do. We will test though Cloud Run on GKE and see what results we will have.

Add 2.) OK, that would be our preferred option. This would really solve all our problems, but, if it is not available yet, no option here.

Regards, Vojko.


On Sunday, 22 March 2020 21:31:20 UTC+1, Jilin Xia wrote:
Hi, Vojko:

    Thanks for interest.

    For ESPv1, we don't officially support ESPv1 on GKE, with x-google-backend.  so, two options:

    1,  Deploy ESPv2 on Cloud Run as an API Gateway, if you still get problems, you can file bugs to us.
    2,  Wait for ESPv2 on GKE launch (should be in Q3, 2020), with x-google-backend support.

Please understand that we have limited resources, so we need to prioritize our work for best customer supports.

Regards
Jilin


On Sun, Mar 22, 2020 at 1:05 PM Vojko <vojko...@dhimahi.com> wrote:
Hello,

We're in the process of setting up ESP with multiple backends. So far we used ingress with paths to differentiate between backend services.




For the future we'd like to implement single ESP that would handle multiple backends. That way we would have a single API that would be processed by multiple backends.



Our attempted solution was to create single OpenAPI specification which would define x-google-backend for different paths in the specification. The idea was that (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-backend) "Whenever your API targets multiple backends." works that way.

We are currently getting different errors when trying to implement this (400 Request Header Or Cookie Too Large, ...). So before going into details, is such a solution possible and is our approach correct? Is there an example of using x-google-backend implemented for GKE?

Thank you and regards, Vojko.

--
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-endpoints+unsub...@googlegroups.com.

Prateek Malhotra

unread,
Mar 27, 2020, 4:05:28 PM3/27/20
to Vojko, Google Cloud Endpoints
Not sure if this would help - but if you want protection for GKE services that are behind a public LoadBalancer, you can try using Cloud IAP? ESP should work with that - that's what I'm doing for endpoints running on GCE I don't want publicly accessible

Prateek Malhotra


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.


--

Jilin Xia

jili...@google.com

Senior Software Engineer


--
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/8f7cc834-5d8f-460d-b474-6534df60b6b6%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages