3 ms·
Maybe stupid question, but when would someone choose this or rqlite over something like Postgres?
by toastercat 5y ago
Maybe stupid question, but when would someone choose this or rqlite over something like Postgres?
- uniqueuid 5y agoSome things that come to my mind: * no tuning (pg_hba, memory, WAL options etc etc.) * presumably fixed memory consumption (if similar to sqlite) * raft gives you usable failover out of the box, whereas with postgres, you need additional (and complex) solutions * less operational complexity
- otoolep 5y agorqlite author here. Good summary, I generally agree. rqlite installation is also very easy, thanks to Go. Single, statically-linked binary you can just drop on your machine. rqlite also has a really simple build process (another explicit goal -- just execute 'go build') making it easy to build it yourself -- giving you a high-level of control over the actual software you run. https://github.com/rqlite/rqlite/blob/master/CONTRIBUTING.md#building-rqlite https://github.com/rqlite/rqlite/blob/master/CONTRIBUTING.md...
- otoolep 5y agorqlite author here. It's not a stupid question. :-) In fact, I answer it head-on in the rqlite FAQ. To quote: "rqlite is very simple to deploy, run, and manage. It's lightweight. It's a single binary you can drop anywhere on a machine, and just start it. This makes it very convenient. It takes literally seconds to configure and form a cluster. With rqlite you have complete control over your database infrastructure, and the data it stores. That said, it's always possible it's too simple for your needs." https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md#why-would-i-use-this-versus-some-other-distributed-database https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md#why-...
- stickupkid 5y agoIgnoring Postgres and comparing apples to apples, rqlite has limitations on "safe" SQL statements[1]. This might be a big deal breaker for you than it might for others. As dqlite replicates the pages and not the SQL statements over raft, which means dqlite doesn't have _that_ problem. Using random() and now() are classified as non-deterministic[2]. Using the application to send the time, although not idea could be used as a workaround, but attempting to use non-deterministic functions in triggers becomes a lot harder. 1. https://github.com/rqlite/rqlite#limitations https://github.com/rqlite/rqlite#limitations 2. https://www.sqlite.org/deterministic.html https://www.sqlite.org/deterministic.html
- otoolep 5y agoYes, that's correct. rqlite does statement-based replication, which means it has the limitation you outlined. This could be solved by parsing the entire SQLite statement passed into rqlite before it's written to the Raft log, but I haven't got around to that yet.