How NOT to get a $30k bill from Firebase
the secret is in the architecture
July last year, a crowd funding campaign went viral in Colombia. It was all good and dandy in the first 48 hours. They managed to reach over 2 million sessions and over 20 million page views — with a website that stayed fully functional without a hitch.
Until they saw the bill.
Whatever gains they had in the crowdfunding campaign would soon be eaten up by the cost of running the application.
Why did it go so wrong?
One of the biggest differences between Firebase and traditional cloud based databases is the pricing model. Amazon, Digital Ocean, Google Cloud, Microsoft Azure and all other providers uses a pay per hour model for instance based databases.
Firebase, however, charges based on per 100k — 250k read, write and delete requests to the database. If you can keep it within this range, then your actual bill shouldn’t cost more than $25. Amazon’s DynamoDB works on a similar pricing mantra, except they split the data storage cost from the read and write requests.
In contrast, traditional cloud databases are limited by the number of concurrent connections available at each tier and it doesn’t really…