I am tring to reduce bandwidth usage by using global variable, Like save data to global variable then i won't have to read data from firestore again between every function execution.
Assume that global variable using about 300MB RAM, But after function execution which function back to idle, Still no costs during idle?
CodePudding user response:
The amount of memory that your function actually uses at runtime is irrelevant for billing. Your are billed based on the total memory available for the type of instance that you've chosen to run your function. and how long the function code actually runs. Add to that also the amount of data it sends. You are not billed for time that a server instance spends idle between function triggers, but you do not also have a guarantee how long a server instance will remain in use before being shut down.
Everything you need to know about billing is detailed in the documentation.