Dual Pricing for GCP Cloud Functions with Firebase - firebase

I created a new GCP Project, and created a hello-world serverless cloud function from GCP Console.
I immediately get a mail that a Firebase project has been created as well, and my Cloud Function has been upgraded to 'Blaze' plan of firebase.
My question is, which pricing model should I refer?
https://cloud.google.com/functions/pricing - GCP
OR
https://firebase.google.com/pricing - Firebase
There is a difference in both pricing, where if you see in firebase pricing, 125K invocations/month are free, while in GCP Pricing, 2M invocations/month are free.
I am confused on which pricing is applicable if I simply want to use Cloud Functions, because even if I create a function from GCP Console, firebase console also shows the function in its console.

You're misunderstanding the Firebase pricing page. The 125K/month refers to the Spark plan in the left most column, all of which is completely free for the month. If your plan is Blaze, you would use the right most column to assess cost. That column doesn't show the free allowance, just the actual costs beyond the free limit. If you hover your mouse over the question mark next to "Cloud Functions" on that row, you will see a description that says the first 2,000,000 invocation are free. This matches the Cloud pricing. So I believe they are in sync.
If you have questions about billing, you should reach out to Firebase support directly rather than Stack Overflow, which is for programming questions.

Related

Firebase billing turn off puppeteer cloud functions

My question consists two parts
What if I turn off Firebase billing and switch to spark plan will all cloud functions will be deleted?
Can I turn off billing using cloud functions and puppeteer to prevent myself from attack?
According to the documentation, your data is not getting deleted but your project loses access to paid features.
There is an example of how to stop billing using Cloud Functions described in the automated cost control responses guide.

for a company interested to use only Firestore, what is the differrence between gcloud and Firebase CLI

My straight question is: since I am not interested in other Google Services, only Firestore, what is the difference between Firebase Cli and gcloud? Can I do all I need only with Firebase Cli or should I learn also gcloud?
I can easilly see that gcloud can handle more services than Firebase Cli. Also I can see Firebase Cli remenber me a lot the purpose of npm+ng cli when working with NodeJs/Angular (a simple analogy about scaffold/initialize/deploy). Nevertheless, our company will only use Firestore to take advantage of its Realtime Database pushing events to our mobile application.
I use Firebase Cli to type in my Windows command line and create a project in Firebase. I can see the result in Firebase Console and I also can see it in Console Cloud Plataform.
For me, who is total beginner with Google Cloud Plataform, it is a bit confused when prefer one over other. For instance, let's say I want to query data from Firebase Crashlytics from command line instead of logging from my Browser. Is it possible to use either Firebase Cli or gcloud? If both, which one is recommended for some company only interested in Firestore project?
This week I am struggling to figure out how to extract metrics regard my Firestore project and if I don't know what is the recommended tool for reach this task it make even harder to find the first steps. By extracting I don't mean see a beatifull dash in Google Console. I mean consume an endpoint providing me Firestore Metrics or, even better, subscribe my endpoint to Firestore project which will be called every time some issue happens (Other question asking exactly about getting Firestore metrics)
It is confusing and is partly the result of Google's acquisition of Firebase, the creation of what's now called Firestore (which is the unification of the original Firebase backend technology and Google Cloud Datastore), and that Google provides the Firestore service to both its Firebase and Google Cloud developer audiences.
As you've gathered, Google Cloud's CLI (Cloud SDK aka gcloud) and the Firebase CLI overlap in functionality. However, importantly:
both CLIs interact with a shared set of Google services (e.g. Firestore, identity, logging etc.).
there are some Google Cloud services not part of Firebase and vice versa
If you're focused on Firebase, you should be to able to stick with the Firebase CLI and continue to interact with Google's services through this Firebase lens.
If you include Google Cloud Platform services that aren't part of Firebase, you'll need to then consider using gcloud but importantly, you can either:
continue to use the Firebase CLI for the Firebase services;
use gcloud to interact with some (not all!) of the Firebase services (e.g. Firestore).
Over time, I assume (!) the remain discord between these 2 platforms will diminish.
If you consider both platforms as the result of (an ongoing?) unification since the acquisition, hopefully, these discrepancies will be more understandable and less frustrating.
Where you do find inconsistencies and frustrations, ensure Google knows by submitting feature requests and bugs.

Firebase: Enable the Google Cloud Build API for your Cloud Functions project?

Hi I am using firebase and the firebase functions.
1 day ago I received an email from Google Cloud with the following content:
Starting April 20, 2020, Cloud Functions will use Google Cloud Build, Container Registry, and Google Cloud Storage to build and store your source code, and deploy container image(s) before running them on Google Cloud. You must enable the Cloud Build API for your project(s) to ensure your Cloud Function is built and deployed correctly. Once you enable the API, you may incur charges if your Cloud Build, Container Registry, or Cloud Storage usage exceeds the free tier limits for these products. You can find a list of your projects that are using Cloud Functions and may be affected by this change at the bottom of this email.
I tend to avoid tinkering the Google Cloud (or even logging in there) as I am using the Firebase as an all inclusive solution and so far I did not have the need to login there.
Now the question:
Do I need to follow the instructions and take action, or is this something separate from the Firebase Functions?
The "affected" project that is mentioned on the email is the Firebase project
To be able to use cloud functions after April 20, 2020 you must enable the Cloud Build API because this will be a new deployment framework.
You will not be able to use cloud functions if you do not enable the Cloud Build API after this date.
These changes will apply even for Firebase cloud functions.
I believe you will need to do it only if you are going to deploy Cloud Functions in the future, Cloud Functions already deployed will not be affected.
In case you are worried about billing, Cloud Build provides a free tier where only usage above 120 build-minutes/day will be charged. When your usage is within the free tier, you will not be charged for the Cloud Build portion of Cloud Function deployments. See Cloud Build pricing for more information.
Similarly, Cloud Storage and Container Registry share a free tier where only usage above 5GB-months will be charged. ( * Note : free tier only limited to US regions - US-WEST1, US-CENTRAL1, and US-EAST1 and aggregated over all 3 regions )​ For example, if you have a large deployment that uses 100GB of storage, you will only be charged an additional $2.47 for storage/month (based on these particular U.S. regional storage prices).
You can monitor your usage and see whether you are getting close to hitting the free quotas.
This is a best effort from Google to communicate information that is necessary to the user’s continued use of the product or that is considered a necessary legal update and keep customers away from having future issues
Using Cloud Build, Container Registry and Cloud Storage provides the following benefits:
Detailed function build logs will be available in the GCP Console, aiding in debugging and increasing visibility.
The ability to get build time that exceeds the current build quota of 120 build-mins/day.
The ability to view a built container image for your function in Container Registry.

Stripe Payment Using Firebase Cloud Funtions Pricing for Live App React Naive

i have implemented Stripe payment gateway using Firebase Cloud Functions in react native. When i test it locally it's worked perfect. payment succeeds but when i go live url , payment can't process due to outbound networking
You can't integrate with Stripe using Cloud Functions on the free
plan, because that plan has a limitation where it's not able to make
outgoing connections to endpoints that are not fully controlled by
Google. This is set in place in order to prevent abuse. You will have
to provide billing information and upgrade to a paid plan.
My Question to Firebase Users is that as a company:
How much i have to pay for this per/month or per year ?
Also is this secure or not ?
And From where i can pay Firebase to able to process live url.
The cost of Cloud Functions is purely based on how much you use it, not on the time period that you use it. For full details I recommend studying the Firebase pricing page, and use the calculator at the bottom of that page. But you can get started without paying, as the Blaze plan has the same free quota that you on the free Spark plan. You'll only start paying for Firebase usage when you go beyond that free quota.
You can upgrade (and later downgrade) your project to the paid plan from the pricing page, or by clicking the upgrade link at the bottom left of your Firebase console.

Pricing for Firebase Blaze plan associated with Google Cloud

Today I started using GCP combined with the Firebase Blaze plan. I Received the 300$ free-trial credit and few more vouchers. Firebase also automatically upgraded to Blaze. I'm wondering if these vouchers cover all the Firebase services...
Firebase projects automatically become pay-as-you-go project projects if you attach a Cloud billing account to them. It's an interesting quirk of the ongoing integrations between Cloud and Firebase, and we'll hopefully get some checks and alerts in place at some point in the future to make this less surprising.
As for the charges, Firebase projects are billed through Cloud like any other Cloud project. In other words, your free credits will be applied.
In addition, Firebase now has a free usage tier on Blaze, so you still won't be charged for any Firebase usage if you stay within the free allotment.

Resources