I just wanted to get people’s thoughts on this as I have been thinking about this for a few days already.
I saw the recent Rails 8 keynote and noticed a sudden interest in SQLite as the primary database backend. I get why people gravitate towards the idea as eliminating that network call to the database in another segment is really priceless. However, am I misunderstanding things though? This will only work on a single-server deployment, right? If you have a highly available, distributed system with redundant microservices, is SQLite still a viable option? I wanted to get people’s thoughts because I was wondering how to actually get this to work. I only came up with two options and I didn’t think either was sustainable.
Let me know what you guys think. I appreciate your feedback and ideas.
The first option I thought of was directing all the write operations to one node and then all reads to the other nodes. Effectively, I am just replicating the traditional database setup with one writable master and a bunch of read-only slaves.
The other option I thought about was implementing an active-active setup where a client can write to all available nodes and each node would handle the conflict resolution through vector clocks.
I don’t know. Not sold with either option. Is there another way to use SQLite and still make the environment highly available? I like the idea of using SQLite because of the raw speed I get but I feel like the complexity that comes with it is not worth it. I feel like I am better off using Postgres. Or is that the problem? Am I trying to solve this problem using traditional concepts?
Thanks in advance for your feedback. Very much appreciated. You guys have a good one! 👍


if we go for a generic distributed application