Live data from Hacker News

How not to get a $30k bill from Firebase

medium.com

21–30 of 114 posts

Re: How not to get a $30k bill from Firebase

#21
post #5

Earlier quoted context omitted.

https://hackernoon.com/how-we-spent-30k-usd-in-firebase-in-l...

Their report reads like they had it coming big time: > The app was running, all the supporters were able to support and the comments on social networks were that the app made it really simple to do support. We were very proud :) > We didn’t want to release any new feature with that many users on the site, so we decided to merge a version with Angular V.6 […]. The site started to load slower, for some users it took th…

Rgerding grant money post says: NXTP Labs acceleration program - so venture capital basically.

Looks like incompetence really, using a framework and unable to pinpoint the bottleneck and deciding that maybe upgrading version will somehow fix their bad code. Not a completely pointless idea as framework might indeed have been changed enough to force them into using itself correctly, but still lot of questions.

Re: How not to get a $30k bill from Firebase

#22
Billing problems aside, it's amazing that web development has reached a stage where it's almost too easy to scale a site to 2m active sessions and 20m+ page views in two days with just off-the-shelf tools and barely any specialized skills.

Re: How not to get a $30k bill from Firebase

#23
I really wish cloud providers would allow users to set a hard budget that just stops the service if you exceed a threshold. I got a surprise bill from AWS this month (fortunately orders of magnitude less than this, but still ~15x my usual) and am thinking of moving from Lambda to a VPS just so the possibility of this doesn't keep me up at night.

Re: How not to get a $30k bill from Firebase

#26
post #19
post #7

Earlier quoted context omitted.

It looks like you get 1 month "free". Open the article in incognito mode and it's available without registration.

> Get one more story in your member preview when you sign up. It’s free. Oh wow, one free story for logging in! Such generosity of content other people wrote for free. Why did we all leave LiveJournal again?

Medium pays the writers who opt-in to the paywall by dividing rev on a pro rata basis a la spotify.

Re: How not to get a $30k bill from Firebase

#27
post #2

TLDR: The huge bill was a result of an improper way the application was coded. They contacted Google/Firebase who were gracious enough to waive off the bill.

That's very nice of them. However I'd have to read all of firebase's small print before i would consider using it. Does their SLA guarantee data availability even if google dcide to spin it off or sunset the way they did with google+, reader and such?

Re: How not to get a $30k bill from Firebase

#30
post #22

Billing problems aside, it's amazing that web development has reached a stage where it's almost too easy to scale a site to 2m active sessions and 20m+ page views in two days with just off-the-shelf tools and barely any specialized skills.

Except for very simple use cases, serverless platforms in general encourage bad software design patterns.

For example, in this case, if a regular database was used instead of Firebase, "counting the number of supporters" would have been done inside the database using a query. The worst that the developer could have done is forget to index to the relevant column; performance would have been sub-par but still orders of magnitude better than Firebase because the bulk of the data would not leave the database if there was a proper query language. With Firebase, when doing complex calculations, not only does the data have to leave the database, it often reaches end users; the calculations then happen on the front end and this is a huge problem in terms security, performance and even correctness (due to latency and the fact that other users may be making conflicting calculations simultaneously based on slightly outdated data).

Also, based on the article's description of the application, it sounds like it may have exposed potentially sensitive data (about supporters) to all users so it may have introduced a security vulnerability. I would not be surprised if this was the case.

Post reply on HN