Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Functions - multi regional setup

When creating an http Google Cloud Function it seems that you are limited to the region of the project in the Google Cloud Console.

What if you want multiple regions for your Cloud Functions but want to have access to the same google services like storage, datastore, etc.? How would you set that up?

Otherwise, someone far from your region may get some latency.

like image 507
Micro Avatar asked Apr 01 '26 14:04

Micro


1 Answers

You can deploy your GCF to multiple regions as Doug says, and obtain something like this:

  • https://europe-west1-my-project.cloudfunctions.net/my-function
  • https://us-central1-my-project.cloudfunctions.net/my-function
  • ...

However, there is currently no managed way to "Load Balance" around multiple regions (hence reaching the best region for you); this burden is currently on you (you need to implement some logic client-side).

I'm trying to understand internally if there's appetite to build this feature (internal number 142776307). Comment here if you're interested in this (use cases / impact).

like image 70
Riccardo Avatar answered Apr 04 '26 06:04

Riccardo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!