#SQLite for Production?

5 messages · Page 1 of 1 (latest)

vapid lintel
#

My Application is not too heavy on data. I around 30 tables. Expect rows in 1000s and Users in Dozens. Would Sqlite be an ok choice for production use? I like because of the simplicity, but I am alo wondering if the solution being so simple makes it any less ideal choice than a conventional rdbms or an RDS service on as where I plan to host?

hoary patrol
# vapid lintel My Application is not too heavy on data. I around 30 tables. Expect rows in 1000...

Yeah, I don't know why you would really want to use it for production, it would be horribly slow. It will be very easy to spin up a mysql instance on whatever service you host your app with. For laravel you really probably only want to use sqlite for testing purposes. Other than that it's useful for client-side applications where such as mobile phone apps where you might need to locally store some data while offline as a fallback before you sync when restablishing a connection. Anyway outside of that, I if you have 30 tables and 1000's of rows, I would just use a hosted relational database that Laravel has a driver for.

bronze schooner
#

SQLite could actually be a really viable option in some cases. This is what they say about it themselves; https://www.sqlite.org/whentouse.html
It's definitely not like it's slow. It has it's uses. Just be aware of the pros and cons, what it can and can't do. And have a good strategy for backups etc. (You should have that with MySQL as well, but lots of people think that's not needed for MySQL and only for "sub par" solutions like SQLite)

vapid lintel
#

@bronze schooner That exact page is what got me into thinking why not use it for prod.

distant relic
#

SQLite is not meant to be used in a production environment, if you are expecting high-availability level infrastructure. Since the file is cached to disk, and if you run your application on 2+ nodes (HA mode), the dataset would not be shared between them. Some people will install MySQL/Postgres on the same host as their application, and this would be vulnerable to the same data loss risks.

If performance is not a concern, you don't need HA, and you have some kind of snapshot setup where you replicate the dataset to another location then you can absolutely use it for your production app. Just be aware of the risks!