Firebase Pricing: Understanding Realtime Database Billing

What Is Firebase?

Firebase is a web and mobile application development platform. It was originally developed in 2011 by Firebase Inc. Google took over this amazing development platform in 2018. Over the years, it has been powering different products and applications. Currently, it has 18 products on over 1.5 million apps.

Firebase Pricing Plans

Firebase Pricing Plans

Firebase offers potential users three major plans. You can choose any package that meets your requirements. They are:

  • Spark Plan: This is a free plan for new users. It has a maximum hosting capacity of 1GB. Every month, it can transfer as much as 10GB.

Its Realtime Database can make 100 connections at once. It can store 1GB of data and 10GB of downloading capacity of 10GB per month.

Storage-wise, it offers the following: 5GB store and daily download capacity of 1 GB. It also offers 20k per day upload operations and 50k/day download operations.

  • Flame Plan: Unlike the Spark Plan that goes for free, you need a monthly subscription fee of $25 to use this package. You will have access to 10 GB hosting capacity and 50GB monthly GB transfer.

You get to enjoy an impressive 100,000 simultaneous connections too. You equally have access to 20 GB downloaded per month and a monthly storage of 2.5 GB.

The storage capacity is 50 GB. The same amount of GB is downloaded daily. The upload and download operations are 100k and 250k daily respectively.

  • Blaze Plan: You get charged according to what you use. You will pay $0.026/GB stored and $0.15 for GB transferred.

You can make 100k/database simultaneous connections. For both GB stored and GB downloaded, the company charges 45/GB and $1/GB simultaneously.

You will also enjoy GB storage at $0.026/GB. GB downloaded will cost you $0.12/GB. Upload operations costs $0.05/10k while you will pay $0.004/10k for download operations.

The pricing seems very affordable. But, some users complain that firebase charges them far above the prices in their plans.

A Startup company owner user who felt he was charged a high fee shared his experience. He wrote: “Due to a change in how they report data usage, our monthly costs for Firebase…has increased from $25 a month to what is now moving towards the $2,000 mark.”

Another Firebase user gave an insight into the exorbitant charges. The user said: “The cloud can be expensive, especially if you fail to optimize your app for the provider’s pricing model. What’s worse is that you won’t feel pricing spikes until your app gets popular, at which point your life will be in total chaos. When your app starts going viral, your costs will increase by the second, so it’s best to make these optimizations early in the game.”

This can be a costly experience for a startup. Such a huge cost of running Firebase may eat deeply into their profit.

How does Firebase charge?

How Does Firebase Charge?

Realtime Database Billing

Firebase bills web developers for data they store in their database. It also charges them for outbound network traffic. Firebase charges $5/GB per month and makes a daily evaluation for an accurate monthly charge.

While measuring outbound traffic, they consider some factors. These are:

  • Encryption overhead
  • Connection.

For billing, Firebase considers these:

  • Data that are downloaded via the database reads.
  • All database operations.
  • Database writes and reads
  • Operations that are prevented from passing through.
  • Traffic to and from your database

These are collectively used for calculating your bill.

Take a look at some traffic examples the company charges:

  • Downloaded data: Each time a client downloads data from your database, the company will charge you for it. This makes up the bulk of your total charges.
  • SSL Encryption: Using SSL encryption comes at a price. You must pay for the secure connections you get from this security technology. For the first handshake, the company may charge you about 3.5KB. If there are TLS record breakers, your charges will multiply into tens of bytes. Although this may seem insignificant, it will add up if you experience huge SSL handshakes. If your devices support huge TLS session tickets, you may record very high SSL connection handshakes.
  • Protocol Overhead: A session is only possible when there is traffic between clients and the server. You may get such traffic from different sources. These sources include:
  • WebSocket overhead
  • Protocol overhead from Firebase Realtime Database
  • HTTP header overhead

When there is a connection, the SSL encryption overhead plus connection overhead make up your cost.

For a single request, this won’t add up much. But, it can be a large part of your bill if you make short or frequent connections. Tiny payloads will increase the cost too.

  • Firebase Console Data: You get charged whenever you write to the Firebase console or read from it.

Estimating Your Bills

Estimating Your Bills

Firebase makes it easy for each user to know their estimated bills. It provides the Usage tab for you to check what your bill looks like for the last 24 hours or 30 days.

You can check the following usage statistics that are available on the Usage tab:

  • Storage: The amount of data you store in your database is available under this tab. This excludes the data you store from any Firebase product.
  • Connections: You can check out your connections here too. This includes real time connections such as long polling and WebSocket. RESTful requests are excluded from this list.
  • Load: This section contains a graphical representation of your load. The graph will show you the processing requests every minute. It will also show you your data usage over time.
  • Downloads: You will find the history of all bytes that are downloaded from your database. Both encryption and protocol overheads make the list.

Firebase Pricing: Minimizing Usage And Cost

It’s clear that several factors determine Firebase pricing. How can you minimize your usage and cost? Here are some practical tips that you can find helpful:

  • Check Your App for Bugs: Bugs may be the reason why you are accumulating huge bandwidth costs. So, if you are not comfortable with your bandwidth bills, check for bugs.

For a thorough check, calculate your read operations with the profiler tool. This tool will measure how your Firebase Realtime Database works. You also need to turn debug logging on in the iOS, Android, and SDKs.

Check your app background also. If there are processes, sync them. This will ensure that everything is working as it should.

  • Use Native SDKs: Each app has a dedicated platform. Try to use SDK that works with your platform. Using the REST API won’t be ideal. The SDK reduces SSL encryption costs by maintaining open connections.
  • Reduce Your Connections: It is also important that you optimize your connection bandwidth to reduce your cost. When you record small REST requests frequently, that will increase your cost. But, a continuous connection when using the native SDK will lower it.

If you regularly use the REST API, you should use the server-sent events or HTTP keep-alive. This will reduce your SSL handshakes significantly.

  • Index Queries: You can reduce the amount of bandwidth that goes into your queries by indexing your data. This serves two purposes. It will boost your database’s performance and lower your costs. The profiler tool also supports data indexing. If your database is home to unindexed queries, use the tool to fish them out.
  • Consider Listeners’ Optimization: If you limit the amount of data your listen operations can return, your usage will get lower. Add some queries to your listeners to do this. More so, consider using listeners that can only update data by downloading updates to them. An example is on () listener rather than the once () listener.

When placing your listeners, another trick is to place them down the path. This reduces the amount of data they can sync.

  • Prune Your Database: Go through your database. If you find duplicate data, remove them immediately. Do this periodically to get rid of whatever may cause high storage costs.
  • Prevent Unauthorized Operations: Do you give everyone access to your database? If so, it could be one of the reasons your bandwidth costs are through the roof. Firebase has a built-in tool, the Firebase Realtime Database Rules. This will enable you to set access restrictions for your database. It helps you prevent users from downloading your database repeatedly. It has some attributes that make it an important tool for access restriction. These are authorization, authentication, and data validation features.

Using these tips could help you reduce your firebase costs considerably.

Firebase Pros

Firebase Pros

Out of all the available development platforms, why should you consider using Firebase? These are some of the reasons why a growing number of developers opt for it:

  • Easy to set up.
  • You can easily use its cloud functions. You can connect to its database effortlessly too.
  • Putting up ads is easy on the platform.
  • It uses JSON data structure. This works well with UI JavaScript.
  • Its free trial allows developers to check the platform out before paying for their services.
  • It offers you the right features that allow you to set your app without delay. This includes monitoring, email, uptime, hosting, auth, and versioning features.
  • It requires little or zero knowledge of devops/sysadmin.
  • It provides a great backend for small apps.
  • Easy streaming or real time updates.
  • It supports robust APIs. This includes several frameworks such as iOS, Angular, and Android.
  • It supports authentication services such as Google, Facebook, and Twitter.

Firebase Cons

In spite of its great features and pros, there are some cons that users should be aware of:

  • You can’t use it without internet connection.
  • Data validation is a little tricky as you can’t test your app one unit at a time.
  • It doesn’t support database migrations. Using a simple SQL database is a lot easier.
  • Users are not allowed to export their user data.

What is Firebase?

Top 3 Alternatives To Firebase

Not sure if firebase is best for you? Here are some good alternatives you might like:

1. Back4App

Back4App is another platform that makes app development easy and fast. The tool makes it easier for developers to create backend without writing a single line of code.

This parse server framework offers developers total control of their operations. So, they can use its amazing features to host their apps and manage them well. Back4App is an open-source and user-friendly platform.

With the support of open-source SDKs, developers can use it to create apps that can run on an array of platforms.

Back4App allows users to scale up applications that are running on the platform.

As an open-source platform, it enjoys the support of the developer community. Most app developers take advantage of its free plan to create amazing apps.

Back4App has three plans. These are:

  • Free: You can try the platform out without paying a dime. The Free Plan offers you 1 GB transfer and 10k requests. You will also have access to 1 GB storage and 250 MD database.
  • Shared: Here, you can take advantage of the platform’s Serverless Architecture to develop your app without delay. Daily backup, multi region, and data recovery are some of its outstanding features.

The Shared Plan offers 4 different plans. These are Silver with $250 monthly billing. Gold Plan attracts $400 monthly subscription fee. Platinum offers tons of features and will cost you $1,000 every month.

  • Dedicated: If you need dedicated infrastructure for your apps, this is the ideal plan for you. It offers dedicated virtual machines and advanced security. You will also enjoy its multi region and multi cloud services.

The Dedicated plan has 4 sub-divisions. The Starter Plan attracts a $5 per month subscription fee and the Basic Plan costs $25 monthly. Others are Standard and Pay As You Go. These plans are available for $50 and $100 respectively.

2. PubNub

PubNub ranks high among the best alternatives to Firebase. The platform enables developers to create apps that can work on different devices and services.

Some of its impressive features are:

  • Storage and Playback: You can retrieve missed messages on the platform. You can also sync with other devices of your choice. This is aside from making it easy for users to have playback sessions.
  • Mobile Push: You can receive push notifications. This is regardless of whether the app is running or not.
  • Data Stream Network: This is a wonderful feature. It offers users the opportunity to send out trillions of messages monthly.
  • Stream Controller: This feature makes it possible to use a connection to listen to different channels.

PubNub offers a free plan. If you are developing non-production applications, you can use it for as long as you wish. But, you must subscribe to a paid plan if you wish to make your app available to the public.

The available plans are:

  • Free: The Free plan is tagged “Plan and Build.” You will enjoy 1 GB data persistence and 1 million transactions on this plan.
  • Standard: This is a prepaid plan that will cost you $49 per month. The platform will charge you $0.000020 per edge transaction. Data Persistence will cost you $8 per GB while you will pay $0.000025 per function execution.
  • Custom: The Custom offer attracts a pay-as-you-go fee. You will enjoy personalized services with the plan. If you have over 20 million transactions, you will get its volume-based discounts.

3. Kuzzle

Kuzzle is another platform that can replace Firebase for app development. It is a good tool for web application developers. If you have an existing app that needs some fine-tuning, use Kuzzle to give it a professional touch. 

Kuzzle offers several features that support swift app development. This includes its real time pub/sub query language, geospatial queries, and speed search.

Some other things you can do with this tool include notifications and messaging. It also has geo-fencing and IoT synchronization capabilities.

What about its multiple protocols and programming languages? These work with its SDKs to help you start your app development on a good note.

Kuzzle offers four different plans. These are:

  • Community: This is a free plan. You have access to community support once you decide to use the platform.
  • Starter: For a $2.40 monthly subscription, you can subscribe to this plan. Once you do, you have unrestricted access to the main Kuzzle’s features.
  • Business: The Business plan costs a $5,000 monthly subscription fee. Such subscribers will have access to Kuzzle’s core features. They will also enjoy dedicated support from the platform.
  • Enterprise: You must contact the platform if you want to subscribe to this plan. Its attractions include Kuzzle’s core product features and support from the platform.

Notably, apart from the Community plan, other plans offer subscriber Service-Level Agreement. This is a contract between you and the service provider. It documents the type of services you will enjoy from the platform.

About the Author


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: