Hacker News new | ask | show | jobs
by tasuki 486 days 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.

1 comments

You 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.

> 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!

You 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.

Yes, 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.
OK. 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.

Most 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!