4 ms·
> There are definitely use cases for Litestream, but it's far from a replacement for your typical Node + PostgreSQL stack If you're a language like Node.js the
by nicoburns 5y ago
> There are definitely use cases for Litestream, but it's far from a replacement for your typical Node + PostgreSQL stack
If you're a language like Node.js then horizontal scaling makes a lot of sense, but I've been working with Rust a lot recently. And Rust is so efficient that you typically end up in a place where a single application server can easily saturate the database. At that point moving them both onto the same box can start to make sense.
This is especially true for a low-traffic apps. I could probably run most of my Rust apps on a VM with 128MB RAM (or even less) and not even a whole CPU core and still get excellent performance. In that context, sticking a SQLite database that backs up to object storage on the same box becomes very attractive from a cost perspective.
- judofyr 5y agoThis is "vertical scaling" and that is indeed a very valid approach! You just have to be aware that vertical scaling has some fundamental limits and it's going to suck big time if it comes at a surprise to you.
- mwcampbell 5y agoConsidering that more powerful machines continue to become more affordable, it's a safe bet that most of us will never hit those limits.
- judofyr 5y agoAlternatively, instead of just betting on it, you could do a benchmark, figure out the limits of your system and check if your current implementation is capable of handling the future needs.
- Karrot_Kream 5y agoNot sure about that. It would be smarter to just failure test your apps. Once you cross some threshold, you scale. Lots of companies build formulas costing out their cloud spend based on infra needs and failure tests.
- lolinder 5y agoYou're not just looking at hardware limits, there are OS limits to be aware of, like the maximum number of concurrent connections per port.
- Sebb767 5y agoNot only is it possible that your users grow, it's also quite possibly that your application complexity does. If you suddenly need to run expensive queries joining multiple datasets or do some heavy computation, your apps resource usage might jump quite a bit. Of course, you can always throw money at it, but the point where it gets seriously expensive can come quite fast.
- deleted 5y ago[deleted]