I am trying to understand cost of google cloud. Suppose I allocate 256 MB for the function and there is 1 minimum instance running all times and maximum instance is set to 2, then what will be monthly cost? I am wondering also if setting minimum instances to 0 will reduce bill significantly or ok to set it as 1 without affecting cost too much. I Could not understand the idle pricing, so If someone has real life example on cost and can share.
-
When posting a question show effort to solve your problem. What did you calculate? – John Hanley Feb 14 '22 at 00:56
-
As Chris covered in their answer, you are missing details that affect the cost of your function. What region? How long does a function take to run? How much networking bandwidth is getting used per function call? How frequently is your function getting called in a month (calls per minute)? Add these details to your question. – samthecodingman Feb 20 '22 at 01:49
-
@samthecodingman I opened the bounty to confirm $6 claim and if the idle time is 15 or 30 minutes – riya Feb 21 '22 at 00:51
-
@riya Without the missing information there is no way to "answer from a reputable source". It can be $2.74, it can be $6, it can be $354 or it can be any other cost. The idle time is deliberately not defined, it can be whatever Google choose it to be - they don't guarantee shelf life of idle functions. – samthecodingman Feb 21 '22 at 05:10
2 Answers
per note ,
Note: 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
Also for Google Function Idle, but I could not find any direct google document on this.
Instances are recycled after 15 minutes of inactivity.
but another answer says it is 30 minutes

- 509
- 1
- 5
- 18
Your question lacks important details such as the execution time of your code or the amount of data moving out from your function but you can use the price calculator to get an estimate.
Keep in mind that since the charge for each million of invocations is 0.40 usd the price for the amount of invocations might not be as important as the price for your connectivity.
For example I did an emulation for a function with minimum 1 instance, 3 million of executions a month, 256mb, 100 ms of execution time and 1 mb of bandwidth per execution and for Uscentral1 you will be charged 354.10
In any case it would be better if you discuss this kind of questions with [Google Cloud Billing Support](Contact Cloud Billing Support) as they will be able to give you the most accurate response to this kind of questions.
Keep in mind that Stack Overflow is more focused towards code and development support

- 4,716
- 2
- 18
- 30