I'm currently setting up ghost on my server. I will host my own blog and probably some more for my friends.
Ghost uses sqlite per default. Sqlite is good for small applications and development environments.
I plan to run my blog for at least 1 - 2 years or longer if ghost will work out well. A blog contains a lot of images and text. The sqlite db will grow over time with more and more images and so on.
Is it ok to use sqlite for this purpose for several years? MySQL would be much more powerful but also more complex to setup.
What would be the best choice for a Ghost Blog?
MySQL has a well-constructed user management system which can handle multiple users and grant various levels of permission. SQLite is suitable for smaller databases. As the database grows the memory requirement also gets larger while using SQLite. Performance optimization is harder when using SQLite.
MySQL 8 is the only supported database in production. As a small team developing open source software that is free to use, we provide a narrow set of environments that are officially supported to keep maintenance manageable. Ghost is built for use with Ubuntu, MySQL 8, nginx and Node.
SQLite will normally work fine as the database backend to a website. But if the website is write-intensive or is so busy that it requires multiple servers, then consider using an enterprise-class client/server database engine instead of SQLite.
SQLite3 is much faster than MySQL database. It's because file database is always faster than unix socket. When I requested edit of channel it took about 0.5-1 sec on MySQL database (127.0. 0.1) and almost instantly (0.1 sec) on SQLite 3.
Please note that database performance depends not so much on the amount of data (until you run out of local disk space) but on the amount of concurrency.
The SQLite documentation says:
SQLite usually will work great as the database engine for low to medium traffic websites (which is to say, 99.9% of all websites). The amount of web traffic that SQLite can handle depends, of course, on how heavily the website uses its database. Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative estimate, not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic.
[…]
But if your website is so busy that you are thinking of splitting the database component off onto a separate machine, then you should definitely consider using an enterprise-class client/server database engine instead of SQLite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With