Understanding Firebase Costs

A Firebase guide to understanding pricing, managing costs, and tracking usage.

Introduction

Firebase is a mobile and web app development platform that helps you build quickly and handles a lot of fundamental infrastructure tasks such as database management, hosting, serverless functions, messaging, and monitoring.

An ongoing concern for Firebase users is cost since Firebase's pricing model is confusing and difficult to track accurately. If you search Google for "Firebase costs" you'll see a lot of horror stories about large unexpected bills. However, with a little knowledge and fireRun.io, you can monitor and manage your Firebase costs so you don't get into trouble.

The Spark Plan (free)

Firebase offers two plans: Spark and Blaze.

The Spark Plan is Firebase's free tier with a very generous allocation offering. The plan is fantastic for startups or those looking to do MVPs. You can set up an entire website or mobile app with a database, messaging, cloud functions, authentication, and a custom domains with SSL for free and have a significant number of users (depending on your app requirements).

No credit card is required to sign up and you will never incur a bill. While that sounds great, it is also part of the danger of being on the Spark Plan.

When your Spark plan's free daily or monthly usage runs out, the Firebase APIs will start refusing requests. Without warning your app can shutdown.

If you have a mission critical app or don't want your app to suddenly shut down, consider upgrading to the Blaze plan.

There are also some restrictions on the Spark plan; for example Cloud Functions can only make API calls to Google APIs. So if you need to fetch from a non-Google service, you'll need to upgrade to the Blaze plan.

The Blaze Plan (pay-as-you-go)

The Blaze plan is pay-as-you-go and requires you to set up billing with a credit card. It is made for larger scale apps or when you can't afford to exceed your free quota and have your app shut down.

You are charged based on your storage and usage of Firebase, so you only pay for what you consume. You still get your free allocation and will only be charged once you go over your quota. Some charges occur daily, such as Firestore reads, or monthly, such as Cloud Function invocations.

However, with your Blaze plan, you can set setup limits and budget alerts, which we'll discuss below.

The Firebase Console

In the Firebase console you can see a lot of details about your current month usage and spend.

Accessing Usage and Billing

In your Firebase console, click on the gear icon in the upper left corner and select "Usage and billing".

Reviewing Your Usage and Spend

Project Costs

You will see your estimate project costs for the current month broken down into Cloud Firestore, Functions, and non-Firebase services.

Previous month usage details are not available in the Firebase console. You need to go to the Google console to see historical data.

Also, the free tier section is missing several usage metrics that you are charged for such as Firebase storage, Cloud Function invocations, and network egress.

Fire Tier Quota

Below the Project costs graph is a section called "Free Tier" of your usage per features (e.g. Firestore) and the percentage of you're free tier used so far.

As noted above, if you're on the Spark plan, you need to carefully track how much of your free quota has been used. If you hit the limit, Firebase will stop accepting API requests. In the example above, once the 1 GB Hosting storage limit has been hit, you will no longer be able to release new code without deleting old ones or moving to the Blaze plan.

Individual Quotas

Finally each section under "Develop" on the left side-panel has a "Usage" tab that show the top metrics for the given functionality. Below is an example of the Database (Realtime DB) usage.

Setting a Budget

Setting a budget is a smart move if you're on the Blaze plan. Setting a budget requires that you have billing setup up in the Google Cloud Console (i.e. you're on the Blaze pay-as-you-go plan).

Under "Usage and billing" click the "Details and Setting" tab. There you will see a card with a link to Google's console's budgeting too. Click the link and you'll be brought in to the Google Console budgeting wizard.

You can also set a Firebase budget in fireRun.io that is a one set process.

The Google Cloud Console

Behind the scenes, Firebase runs on top of Google Cloud. The Google Cloud Console (GCC) is the means by which you access and manage the cloud functionality. Here you can dive into the gory details of usage and billing by taking a look at the man behind the curtain (Google Cloud).

Accessing GCC

As before, go to "Usage and Billing" by clicking the gear icon in the left side-panel.

Hover or click the "Beta" tag and then click the "Google Cloud Console" link.

Reports in GCC

The Google Cloud Console is a large app with a lot of functionality. We will not cover all the capabilities here, except for one: Reports. Report are useful to see where your cost are for a give function.

Open the console Navigation menu (menu), and then select Billing and then Reports

In Report, you can select the time period and "Products", such as Firestore, you want to filter on. You will be able to view the break down of cost over the course of the month. Unlike in the Firebase console, here you can view your historical data.

Quick Tips

A few tips on how to approach Firebase costs and usage.

General Plans and Billing

Hosting

Firestore and Real-time Database

Cloud Functions

Additional Resources

External Firebase Resources

  • A great video from Firebase that reviews not only Firestore pricing, but overall Firebase pricing.

  • An in-depth discussion on how Firebase relates to Google Cloud.

fireRun.io Dashboard

Head back to your 🔥fireRun.io Dashboard 🔥to see you usage and spend.

Questions or Help

Please email or chat with us for any questions or comments

Last updated

Was this helpful?