News for hackers. Stuff that matters.
Re:What software engineers can learn from the rapid collapse... by kragen on Friday April 08, 2022 @05:26AM (#30954980)
Your server has 128 gibibytes of RAM, and has for five years now. In fact, you can buy off-the-shelf servers with a tebibyte of RAM now. As long as you have some way to recover from a power failure, if there's something you could do with Postgres without sharding fifteen years ago, you can do it in RAM on a single server now. But, if it was disk-bound, you can do it about a million times faster than you could do it then.

It's reasonable to argue that shelling out the US$800 for a server with 128 gibibytes of RAM (or renting one from a cloud provider for US$150 a month) amounts to buying nifty toys for the engineering department. But if you're paying each engineer US$200k per year in salary and a similar amount in benefits, that's US$190 an hour, so each engineer's workday buys you almost four such servers. Your RAM has a minimum transaction time of about 100 ns, while an SSD is more like 10000 ns. If you have 100+ GiB of data to query, the alternative to buying nifty toys is paying the engineering department to do optimization work that wouldn't be necessary if your data was stored in memory that was 100x faster.

The rough equivalency here is that adding one more engineer to your team costs as much as adding 16 dedicated Xeon servers at Hetzner with 128 GiB of RAM each.

Sometimes the best answer is still a relational database, of course! It's often easier to write your queries in relational terms than by looping over hash tables, though probably not if you're using an ORM, and Postgres is delighted to cache all your data in RAM.

At some point, you may grow beyond being able to run your production environment on a single server, at which point splitting things into tiers is worthwhile. (In some cases you start at that point, for whatever reason, but a lot of web services can serve a million users on a single server. It sure sounds like Fast's service would have worked fine on a single server.)

Re:What software engineers can learn from the rapid collapse... by zozbot234 on Friday April 08, 2022 @06:25AM (#30955313)
The point of a RDBMS has never been to save on RAM, raw files have undesirable properties for lots of data management scenarios. You can have a very simple schema if you like, e.g. a RDBMS makes for a damn good key-value store.