API Gateway and regional routing

139 views
Skip to first unread message

Henrik Hedlund

unread,
Mar 4, 2021, 8:35:17 AM3/4/21
to Google Cloud Endpoints
Hei,
We're looking to migrate from Cloud Endpoints to API Gateway, but there is one thing we're having a hard time figuring out - regional routing with a global HTTPS Load Balancer.

The documentation simply states that "You then configure a load balancer to handle requests to the API and forward the request to the appropriate region.", without giving any clues on how to achieve this.

Using Cloud Endpoints I would simply deploy the ESPv2 as Cloud Run instances in various regions, then use Serverless NEGs to connect those instances to the HTTPS Load Balancer.

But AFAIK it is not possible to connect a serverless NEG to an API Gateway, and normal zonal NEGs is not possible to use with serverless components.

I have a discussion with a support agent who claims that I should be able to use Global/Internet NEGs to connect my (regional) API Gateways to the Load Balancer, and that the LB will be able to figure out the region of the backends based on the URL to the API Gateways. However, it is not possible to:

1. Connect two (or more) global NEGs to the same load balancer, or
2. Connect two endpoints to the same global NEG

So I'm having a really hard time figuring out how to provide regional routing for API Gateway. So if anyone have any ideas, I'd love to hear them.. :)

Thanks!

Best regards,
Henrik

Teju Nareddy

unread,
Mar 4, 2021, 11:44:56 AM3/4/21
to Henrik Hedlund, Josh Einhorn, Google Cloud Endpoints
+Josh Einhorn, you previously mentioned Serverless NEG integration with Cloud API Gateway. Do you know more about this?

--
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/f1b24fd8-e08e-4d4f-acb8-8967a4f8464bn%40googlegroups.com.


--

Teju Nareddy

nare...@google.com

Software Engineer

Josh Einhorn

unread,
Mar 4, 2021, 3:16:10 PM3/4/21
to Teju Nareddy, Henrik Hedlund, Google Cloud Endpoints
But AFAIK it is not possible to connect a serverless NEG to an API Gateway, and normal zonal NEGs is not possible to use with serverless components.

That's right, it is not supported yet. However this feature is coming very soon since it has been a well known blocker for the scenario you're trying to achieve. I cannot give dates but I can tell you we're in the final integration testing phase of this feature.

And you're right, the Internet NEG is very much a workaround and is not actually region-aware; I would still recommend it for prototyping though, with an eye towards the upcoming Serverless NEG integration for production usage.

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

Henrik Hedlund

unread,
Mar 4, 2021, 4:08:47 PM3/4/21
to Google Cloud Endpoints
Hi Josh & Teju,
Thank you very much for the clarification. I guess we'll just have to stick with Cloud Endpoints for now.

Today, my test setup with API Gateway -> Global NEG -> HTTPS Load Balancer just decided to stop responding. Apparently the LB can't talk to the API Gateway anymore (which works fine on its own), and there are no errors anywhere (besides the 502 from the LB), so I wouldn't trust this setup right now anyways.. :)

Best regards,
Henrik
Reply all
Reply to author
Forward
0 new messages