2 ms·
> Removing the network latency is a massive gain, especially for small/medium apps, which is most sites. No it's not. Network latency is negligible, assuming y
by crazygringo 2y ago
> Removing the network latency is a massive gain, especially for small/medium apps, which is most sites.
No it's not. Network latency is negligible, assuming your database isn't halfway across the world or something.
And as soon as you have to scale to just two webservers, you've either got to implement a client-server network layer on top anyways, or else the complexity of a replication layer.
Just start with Postgres or MySQL in the first place. It's just as performant, just as easy to set up, and can actually scale as you need it. Don't be "brave" when there isn't even any payoff involved.
- tasuki 2y ago> Network latency is negligible Yes but now you also have a network to maintain. > Just start with Postgres or MySQL in the first place. It's just as performant, just as easy to set up Yes it's easy to set up. But then you have to maintain it. It's another daemon that needs care.
- crazygringo 2y agoYou don't have a network to maintain. If you have a server, it's already on a network. And you don't have to do any more maintenance on Postgres/MySQL than you have to do on SQLite. You can leave them running for years without touching them. Maybe you want to upgrade them, but maybe you want to upgrade SQLite too.
- tasuki 2y ago> You don't have a network to maintain. If you have a server, it's already on a network. Well, I'm sure the db server has an IP address? Is it IPV4 or IPV6? How do you receive the IP address? Can it change or not? How do you secure the connection between your web server and the database? Should the database only accept network traffic from your web server or from the wide internet? If the former, you have to keep that in mind when adding a new web server. If the latter, make damn sure the credentials don't leak! Congratulations, you now maintain a network!
- crazygringo 2y agoYou call that maintaining a network? I call it five minutes of setup, if even. And if you're dealing with SQLite, are you making backups somewhere on a network? Securely? With credentials? Where do you keep the credentials for your webserver itself? If you're running a website, you're dealing with networking and credentials from the start.
- tasuki 2y agoYes, it's five minutes to set up now. But it's an extra liability to have to maintain the network in the future, when things inevitably change.
- crazygringo 2y agoOK. Maybe an extra 10 min of work in the future? Compare that to the days or even weeks it's going to take you to migrate to a client-server database platform as soon as you need to scale to two webservers. All the queries that need to be tested and modified as necessary... potentially different table structures... the migration of data... no thanks.
- tasuki 2y agoMost projects will never need to scale to two web servers. The ones that do will be successful enough to have the resources to migrate. But I guess this all depends on whether it's B2B (likely not to have that many customers), B2C (potentially more users), or a hobby project (gimme operational simplicity!). And many other variables. YMMV!