Patrick Oshea
Patrick Oshea

Reputation: 96

Is there a way to deploy multiple firebase cloud functions, each to their own instance?

I currently have a firebase project with multiple cloud functions defined. Each of these functions resides in its own folder with two files: index.js and package.json. As far as I've been able to tell, it is possible to import all of these functions into the index.js file within the default functions folder and export them. However, this approach leads to the deployment of all the functions on the same instance. Is there a way to force them to deploy on their own instances? Thank you!

Upvotes: 3

Views: 1254

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598797

Firebase parses the index.js and creates separate containers for each exported function.

So each exported function in Cloud Functions runs on its own container instance(s) already. Separately exported functions will never run on the same container instance.

Upvotes: 5

Related Questions