Live data from Hacker News

How not to get a $30k bill from Firebase

medium.com

41–50 of 114 posts

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

#41
post #40
post #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.

I think there'd be two big issues - (1) what is reasonable behaviour when you reach your budget, and (2) the consistency of billing. On (1), if you get to say the 14th of the month and run out of budget, what would be the expected behaviour? - shut down all your services? delete all your data so that's not incurring a charge too? It'd probably have to be configurable on a service by service basis, and that's an awful…

> it's not likely to move the needle on any metric they really care about considerably.

what about devs too scared to put their CC no in the till coz they've heard horror stories about being overcharged for mistakes? Just recently had to sort out a feature that a junior dev created using openstreetmaps coz they didn't want to be on the hook by putting their card into google maps... It was for an internal portal, usage wasn't even high enough to hit the monthly free tier!

Hour 1 experience also matters.

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

#42
post #37
post #12

Earlier quoted context omitted.

Yeah I can get passed it but damn it's become a mess, I understand they have to make money.

It seems we have a pretty fucked up cycle here: * Create quality service, prioritizing user experience over money * Grow site to significant user base * Start running out of money, because hosting and running a site does cost money * Try to monetize service * Get out-competed by another service still at step 1 The presence of VC money that's all about capturing market share now, and monetizing later does not help. In…

I was just thinking that, fully agree. One of the things I learned from startup school: Get people to pay asap. If you are really are solving a problem they do not care that your website is a bit buggy and it's made with bootstrap.

All these platforms rake in millions of VC money to get market share (that is fine btw) but if you do not know how to monetize it, what is the point? And of course always being free and then moving to a paid model doesn't make your users really happy.

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

#43
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?

Does it matter what their fine print says if you have to bang your head against a buggy automated bot process to get support things done? Switched over to MS appcenter recently(they added support for cosmosdb + authentication). Their customer care is so nice by comparison

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

#44
post #41
post #40

Earlier quoted context omitted.

I think there'd be two big issues - (1) what is reasonable behaviour when you reach your budget, and (2) the consistency of billing. On (1), if you get to say the 14th of the month and run out of budget, what would be the expected behaviour? - shut down all your services? delete all your data so that's not incurring a charge too? It'd probably have to be configurable on a service by service basis, and that's an awful…

> it's not likely to move the needle on any metric they really care about considerably. what about devs too scared to put their CC no in the till coz they've heard horror stories about being overcharged for mistakes? Just recently had to sort out a feature that a junior dev created using openstreetmaps coz they didn't want to be on the hook by putting their card into google maps... It was for an internal portal, usag…

Why would a junior dev be using _their_ card details? Surely your company has a corporate billing account with Google for this purpose?

Perhaps I've misunderstood the situation, but if I were working as a dev at a company and was expected to provide my own card details to pay for APIs, I would walk out the door.

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

#45
post #38
post #3

Earlier quoted context omitted.

Glad to hear that Google has done something with it. Also that's one of the reasons I try to use the realtime database, and not firestore. But they still charge for bandwidth there (most if it is consumed by downloading the SSL certificates from the clients).

This must be the first time I hear about Google responding timely and adequately to a specific problem of a customer. Could the publicity have something to do with it?

More likely because google responds timely and adequately to customers all the time but nobody tweets about it or writes a medium post that gets shared.

See "Dog bites man" vs. "Man bites dog"

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

#46
post #44
post #41

Earlier quoted context omitted.

> it's not likely to move the needle on any metric they really care about considerably. what about devs too scared to put their CC no in the till coz they've heard horror stories about being overcharged for mistakes? Just recently had to sort out a feature that a junior dev created using openstreetmaps coz they didn't want to be on the hook by putting their card into google maps... It was for an internal portal, usag…

Why would a junior dev be using _their_ card details? Surely your company has a corporate billing account with Google for this purpose? Perhaps I've misunderstood the situation, but if I were working as a dev at a company and was expected to provide my own card details to pay for APIs, I would walk out the door.

They were just told to make the portal as a learning teambuilding exercise, choice of tools was entirely up to them - i even told the person company would pony up for anything they ended up spending. HR was being a pain about getting card details(it's not easy getting that stuff in india)

The dude bounced off google maps as soon as he saw the form to enter payment info and went straight to open street maps.

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

#47
I just want to point out to people who are new to Firebase that you can query your Firestore collections. Also, Firestore Queries are cached by default, so if you try and fetch data that hasn’t changed, you shouldn’t have to pay for that read.

db.collection(‘Payments’).where(‘id’, ‘==’, ‘payment 1’).onSnapshot(console.log) // 1 read, then cached

Whereas specifying a document and then manually get it always counts as a read. Example;

db.collection(‘Payments’).doc(‘payment 1’).get() // always counted as a read

It's funny.

I've had multiple discussions with people who build apps using Firebase and then not being able to scale to 1000 concurrent people without the BE falling apart. I want to tell them that they've done something wrong, but since none of my apps haven't reached those kind of usage levels, I really don't know.

I think Firebase comes with a lot of power, and as long as so plan to scale, design your database model, have proper security rules and cache as much as you can, you can probably host a 1M concurrent users without getting scaling problems. Cost though, ooh yeez. :)

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

#48
post #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.

Only Amazon is adamant at refusing this, Microsoft already made it possible some years ago, and I believe Google too.

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

#49
post #46
post #44

Earlier quoted context omitted.

Why would a junior dev be using _their_ card details? Surely your company has a corporate billing account with Google for this purpose? Perhaps I've misunderstood the situation, but if I were working as a dev at a company and was expected to provide my own card details to pay for APIs, I would walk out the door.

They were just told to make the portal as a learning teambuilding exercise, choice of tools was entirely up to them - i even told the person company would pony up for anything they ended up spending. HR was being a pain about getting card details(it's not easy getting that stuff in india) The dude bounced off google maps as soon as he saw the form to enter payment info and went straight to open street maps.

Was the choice of OSM a bad one?

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

#50
That's why I don't use cloud offerings. Their pricing models are designed to trap someone with a exorbitant bill and you don't have control over it. For example let's say you put an image on a CDN and someone who doesn't like you runs AB for a couple of days making billions of requests to bankrupt you or someone finds a page that runs costly queries and sets up curl against it. No thanks.
Post reply on HN