Firebase is cool. Its allows you to create mobile and web apps without thinking too much about backend. It has everything a modern app needs. Hosting, user management, database storage, file storage, server-less functions, etc.

It’s all good. But there are somethings. If you are unaware or careless about, you might have to pay bills that you never expected.

In this post, I’ll take you through journey of how we paid Firebase, the money we never made.

It’s initial launch of our app in the store, everything is running smooth. 3 months past. We see a Firebase bill arrive in the mailbox. We thought, as our customer base was growing, it’s fair.

1 more month passes by, a new bill arrives in the mailbox. This time the bill was a bit higher. We thought, something isn’t right but didn’t look into what caused the bill.

The next month bill arrived in the mailbox. This time the bill went nuts and we were surprised, because looking at our customer base and app usage. There was no reason for the bill to be that high. It’s was so high, that we didn’t make that much money from our app.

The Investigation

It was clear that we needed to find out what was causing the bill. After some investigation. We found that we were billed for our lack of knowledge and awareness about Firebase.

Findings

Here is what we learnt.

Real-time database updates

While learning about Firebase database. This was the feature which got us excited the most. Because on app we didn’t need to poll for updates or provide refresh button for users to refresh. But this came to bite us. We were subscribing and unsubscribing from real-time listeners on screen change. Meaning let’s say we have 100 items list in the database. We add the listener, get the data and unsubscribe from listener on screen change. If the user navigates to another screen and back again. We would do the whole thing all over again even though there were no changes in data. Which turned out to be very expensive.

#software-development #android #firebase #serverless #programming #web

How We Paid Firebase, The Money We Never Made
1.50 GEEK