Member-only story

Beware of those free tiers

Rajesh Kanade
4 min readDec 22, 2022

--

Recently in a code review session for a product under development, got to know the team was using Firebase for in-app notifications. Looked like a reasonable choice nevertheless reminded me of the infamous story how a startup almost went bankrupt using Firebase. I shared the story with the team & requested them to apply learnings if any from the same.

The story is really about how a startup got a bill of 72K USD overnight after launching their application. Following are few wisdom nuggets from the story.

I jumped out of the bed, logged into Google Cloud Billing, and saw a bill for ~$5,000. Super stressed, and not sure what happened, I clicked around, trying to figure out what was happening. I also started thinking of what may have happened, and how we could “possibly” pay the $5K bill.
The problem was, every minute the bill kept going up. After 5 minutes, the bill read $15,000, in 20 mins, it said $25,000. I wasn’t sure where it would stop. Perhaps it won’t stop? After two hours, it settled at a little short of $72,000.

Techies should NOT skip the part 2 of the story where the author talks about the code in his application that led to this and how he fixed it. Here is a summary from part 2 for the busy bees.

While creating a Cloud Run service, we chose default values in the service. The max-instances is preset to 1000, and concurrency set to 80. In the beginning we didn’t know that these values are actually worst case scenario for a test program.
Had we chosen max-instances to be “2”

--

--

Rajesh Kanade
Rajesh Kanade

Written by Rajesh Kanade

Rajesh Kanade, Founder, Grey Neurons Consulting Linked In : https://www.linkedin.com/in/rkanade/

No responses yet