question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy function to multiple region

See original GitHub issue

Can a function be deployed to multiple region?

I read this page(https://firebase.google.com/docs/functions/manage-functions?hl=ja), and, in this page, multiple region is specified in firebase.region function. Then I tried to deploy one function to multiple region, but the function is only deployed to first one region…

ex: index.js

const functions = require('firebase-functions');

exports.test = functions.region('us-east1', 'asia-northeast1').https.onRequest((req, res)=>{
    console.log(`in test func`);
    return res.status(200).send('response from test func')
})

then I deployed this function with firebase deploy

Expected result : this function is deployed to us-east1 and asia-northeast1

Actual result: this function is only deployed to us-east1

dependencies: “firebase-admin”: “6.0.0”, “firebase-functions”: “2.0.5”

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
joehancommented, Jan 11, 2019

Fixed! With the next release, you will be able to deploy to multiple regions by passing multiple region strings to functions.region(), like so: functions.region(‘us-east1’, ‘us-central1’)…

2reactions
thechenkycommented, Dec 18, 2018

Hi @soichisumi, the backend bug that @laurenzlong mentioned has now been resolved and the fix has been rolled out to production. You can now have two functions with the same name deployed to different regions. We will now be working on adding multi-region support to the SDK so that you can deploy one function to multiple regions like you were trying to do. I’ll keep this bug open to reference in the PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy Firebase Cloud Functions across multiple regions
You can specify multiple regions by passing multiple comma-separated region strings in functions.region() . Hence, something like function f(req ...
Read more >
Serve traffic from multiple regions | Cloud Run Documentation
Deploy your Service to available Cloud Run regions. For ease of management, you can use the same service name across multiple regions. Note:...
Read more >
Cloud Functions locations - Firebase - Google
You can specify multiple regions by passing multiple comma-separated region strings in functions.region() . See change a function's region for more ...
Read more >
Move your function app between regions in Azure Functions
Learn how to move Azure Functions resources from one region to another by creating a copy of your existing Azure Function resources in...
Read more >
Multi-Region Infrastructure Deployment | AWS Solutions
The Multi-Region Infrastructure Deployment guidance helps customers more easily control updates to infrastructure for applications that are deployed across ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found