Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

177
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda