News for hackers. Stuff that matters.
Re:How we spent $30k in Firebase in less than 72 hours by noncoml on Wednesday August 01, 2018 @10:18PM (#17668804)
I wouldn’t call it architecture decision. It’s the equivalent of a bad SQL query.
Re:How we spent $30k in Firebase in less than 72 hours by avargas on Wednesday August 01, 2018 @10:23PM (#17668831)
A bad sql query wouldn't do that. Look at their site, from the US, it calls cloud functions for a COP to USD conversion, on each place they render a currency (200+ requests just going to their homepage). I think it was built poorly, but that's just my opinion.
Re:How we spent $30k in Firebase in less than 72 hours by whoisjuan on Wednesday August 01, 2018 @11:13PM (#17669004)
I agree with you. There are so many ways to make this infinitely more efficient. For starters, why are they re-calculating and re-rendering the value every time they get a new donation? Also, they could store those values in a more cold&cached-storage and just make the reads to update from Firestore. Don't use a freaking database that is charging you for every single read and write, to deal with mundane client-side renderings.
Re:How we spent $30k in Firebase in less than 72 hours by Timshel on Thursday August 02, 2018 @04:01AM (#17669925)
Changing the currency will re-trigger all those conversion calls ...
Re:How we spent $30k in Firebase in less than 72 hours by dragonwriter on Thursday August 02, 2018 @01:56AM (#17669490)
It's more like a naive database design which doesn't consider the access pattern and therefore requires an inefficient query, which is definitely an architectural issue.