Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Firebase Callable Functions cold-start

I want to use the Firebase callable functions to run checks on the back-end but I am worried about the cold-start. For instance, I want to check if a user has sufficient credits to download a certain product but I would like to avoid users waiting 10 seconds or more before this promise gets resolved or rejected, and running these checks from the front-end is no option as anyone could bypass them.

Is there a way to do provisioning for a selected group of callable functions on Firebase so that the whole experience doesn't feel slow and frustrating for users? Many users if they have to wait 10 seconds (even if its just for the first time) might give up using this service I want to sell...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Is there a way to do provisioning for a selected group of callable functions on Firebase?

Yes, as explained in the doc, you can set a minimum number of instances for a given Cloud Function with the runWith parameter, as shown below:

exports.myCallableCloudFunction = functions
    .runWith({
      // Keep 1 instance warm
      minInstances: 1,
    })
    .https.onCall((data, context) => {
      // Cloud Function code
    });

You can have more than one instance warm by passing the desired value, e.g. minInstances: 3.

Note that "a minimum number of instances kept running incur billing costs at idle rates. Typically, to keep one idle function instance warm costs less than $6.00 a month" (excerpt from the doc).


Note also that you need to configure each Cloud Function with this option, AFAIK you cannot apply it to a group of Cloud Functions.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!