HNHacker News
TopNewBestAskShowJobs

otoolep

5,215 karma · joined April 3, 2014

Software Engineer based in Pittsburgh, PA. Engineering Manager at Google, building large-scale data systems. Creator of rqlite[1], the lightweight, distributed database built on SQLite.

https://www.philipotoole.com

[1] https://www.rqlite.io

submissionscomments
otoolep··on D1: Our SQL database
I agree -- this blog post is light on details. To me the value Cloudflare believes they are offering is mostly ease-of-use, particularly setup. With minimal work you can have a stateful, relational store available to your code. But in terms of actual database functionality, they are not offering anything particularly novel. Of course, I might be missing something.

In fact, I don't see anything D1 is doing that is not already offered by something like rqlite[1], which is also a super-easy-to-use distributed database built on SQLite. Of course Cloudflare will run the database for you, which is a great help -- they take care of the uptime, monitoring, backups, etc. And that's important obviously, because in the real-world databases must be operated.

Disclaimer: I am the creator of rqlite.

[1] https://github.com/rqlite/rqlite

otoolep··on D1: Our SQL database
rqlite also supports read-only nodes, so in theory you can have more nodes at the edge, just like D1 -- but these nodes won't participate in the distributed consensus process. Those nodes will keep up-to-date with changes, even catching up in the event of a temporary disconnection.
otoolep··on D1: Our SQL database
You've basically described rqlite [1], which uses Raft to coordinate the changes to the Leader, and then across some number of Followers. The write won't be acked until a quorum has persisted the change, and committed to the underlying SQLite database.

Disclaimer: I am the creator of rqlite.

[1] https://github.com/rqlite/rqlite

otoolep··on D1: Our SQL database
rqlite author here, happy to answer any questions.
otoolep··on I'm all-in on server-side SQLite
Agreed, they generally solve different problems. It's important to understand that rqlite's goal is not to replicate SQLite per-se. Its primary goal is to be the world's "easiest to operate, highly-available, distributed relational database". :-) It's trivial to deploy, and very simple to run. As part of meeting that goal of simplicity it uses SQLite as its database engine.
otoolep··on I'm all-in on server-side SQLite
rqlite author here. The way I think about it is that both systems add reliability to SQLite, but in addition rqlite also offers high-availability. Another important difference is that Litestream does not require you to change how your application interacts with the SQLite database, but rqlite does.

Another way I think about it (I'm sure Ben may have other ideas!) is that if you want to add a layer of reliability to a SQLite-based application, Litestream will work very well and is quite elegant. But if you have a set of data that you absolutely must have access to at all times, and you want to store that data in a SQLite database, rqlite could meet your needs.

Check out the rqlite FAQ for more.

https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md

https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md#How-...

otoolep··on I'm all-in on server-side SQLite
rqlite author here. Anything else you can tell me about why you decided against it? Just simpler, as you say, to avoid a distributed system when you can (something I understand).
otoolep··on I'm all-in on server-side SQLite
Congratulations to Ben! This project has been like a rocket ship.
otoolep··on Ask HN: Have you used SQLite as a primary database?
That's correct. rqlite replicates SQLite for fault-tolerance and high-availability, not for performance. It fact performance takes a hit, for the reasons you state. But it's no worse (nor better) than something like, say, etcd or Consul.

https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md#what...

otoolep··on Ask HN: Have you used SQLite as a primary database?
rqlite author here, happy to answer any questions. One thing I've noticed is a trend towards folks doing bitcoin mining (and related applications) wanting to use rqlite. I think they like that it is very easy to run, and gives them complete control over their data.

https://docs.google.com/presentation/d/1Q8lQgCaODlecHa2hS-Oe...

otoolep··on Testing consistency of rqlite
Not sure if I follow you, but that's exactly what rqlite does support.

https://github.com/rqlite/rqlite/blob/master/DOC/BULK.md

otoolep··on Testing consistency of rqlite
Thanks again for the great write-up.
otoolep··on Testing consistency of rqlite
Quoting from the FAQ:

dqlite is library, written in C, that you need to integrate with your own software. That requires programming. rqlite is a standalone application -- it's a full RDBMS (albeit a relatively simple one). rqlite has everything you need to read and write data, and backup, maintain, and monitor the database itself. rqlite and dqlite are completely separate projects, and rqlite does not use dqlite. In fact, rqlite was created before dqlite.

https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md#how-...

otoolep··on Testing consistency of rqlite
Yeah, it would distract from the key goal of rqlite -- which is a trivial to deploy, simple to operate, reliable distributed store for critical relational data.
otoolep··on Testing consistency of rqlite
I have considered it, but it would introduce a very large amount of complexity -- and make rqlite much more complicated to operate. Adding this type of functionality would push mean rqlite would no longer be a worthwhile system to use. It would do something (sharding) probably no better than other systems, but no longer be trivial to operate. rqlite does something somewhat narrow, but does that very well (though I would say that :-) )
otoolep··on Testing consistency of rqlite
Correct, the answer is no, it doesn't support that form of sharding.
otoolep··on Testing consistency of rqlite
Yes, I have a design in mind, but it's a fair amount of work. It will require a new API too -- and API that allows clients to explicitly create a new connection, create a transaction on it, and close that transaction when finished.
otoolep··on Testing consistency of rqlite
Yes, simplicity of operation is a key goal of rqlite. To quote from the FAQ:

rqlite is very simple to deploy, run, and manage -- in fact, simplicity-of-operation is a key design goal. It's also lightweight and easy to query. It's a single binary you can drop anywhere on a machine, and just start it, which makes it very convenient. It takes literally seconds to configure and form a cluster, which provides you with fault-tolerance and high-availability. With rqlite you have complete control over your database infrastructure, and the data it stores.

https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md#why-...

otoolep··on Testing consistency of rqlite
That's reasonable -- thanks.
otoolep··on Testing consistency of rqlite
I called it "Jepsen-style" testing.
otoolep··on Testing consistency of rqlite
No, it's due to rqlite.

rqlite does support a form of transactions -- you can send a set of SQLite statements, and either all will be successful, or none will be. You can even send a BEGIN statement, and a SQLite transaction will be opened (and you can COMMIT later). However, due to the nature of Raft, restarting the cluster in the middle of an open transaction will not clear the transaction -- and most folks probably don't expect this. That's why I need to think more before advocating use of traditional transactions with rqlite -- distributed transaction functionality is easy to get wrong, so requires careful thought. You can use SQLite transactions, but you must be careful. That's why drivers don't tend to support it yet.

https://github.com/rqlite/rqlite/blob/master/DOC/DATA_API.md...

otoolep··on Testing consistency of rqlite
OK, how do you suggest I change the title? I'm open to a better one. I'm used to the casual use of "Jepsen" for this type of testing. But yes, there is also the case where Kyle does the testing himself -- and this is not that.

Their implementation is up on GitHub, I'm sure they would be interested in any feedback on it.

https://github.com/wildarch/jepsen.rqlite

(To be clear, I wasn't involved with this testing, I just heard about it today and found it interesting)

otoolep··on Testing consistency of rqlite
rqlite author here, happy to answer any questions. Many thanks to Nienke Eijsvogel, Ruben van Baarle and Daan de Graaf for executing this testing.

https://github.com/rqlite/rqlite

otoolep··on Mgmt – Next generation distributed, event-driven, parallel config management
rqlite author here -- good to hear that rqlite is working for you. Are you using read-only nodes? Happy to answer any other questions.

https://github.com/rqlite/rqlite

otoolep··on Ask HN: Why are there no easy-to-use highly-available open source databases?
Full details on what the limits in rqlite may be, and why, are here: https://github.com/rqlite/rqlite/blob/master/DOC/PERFORMANCE...

That said, very large datasets (> 2GB) will work, if you've got the disks and memory to handle it. The link above explains how to do it.

otoolep··on Ask HN: Why are there no easy-to-use highly-available open source databases?
You can go larger than 9, quite a bit larger. I just suggested 9 as a useful size. But the 7.x series introduced much better support for Kubernetes, so it's much easier now to manage larger clusters.

But larger clusters mean a larger quorum, so larger isn't really better. It depends on what you want. If you want a distributed database where more nodes means more write performance, then rqlite may not be a good fit. rqlite is distributed for fault-tolerance and HA, not for performance.

otoolep··on Ask HN: Why are there no easy-to-use highly-available open source databases?
rqlite https://github.com/rqlite/rqlite

I'm the creator of this project. While it's not going to work super well at very large datasets, it's explicitly designed to be trivial to deploy, and very easy to operate. You can get it up and running in seconds, and clustering seconds later. My practical experience with databases told me that operating the database is at least as important as performing queries with it. So I put a lot of work into easy clustering, clear diagnostics, and solid code.

otoolep··on Ask HN: Why are there no easy-to-use highly-available open source databases?
rqlite author here. Happy to answer any questions.

Noting the title of this topic, rqlite is specifically designed to be easy to use. I know of no other HA database that is simpler to operate. Installation is trivial, and clustering is easy. You interact with it via a HTTP API.

And you get all the power and quality of SQLite as the database engine.

otoolep··on Ws4sqlite: Query SQLite via HTTP
rqlite author here. Yes, that is a correct statement about rqlite.

https://github.com/rqlite/rqlite/blob/master/DOC/FAQ.md

otoolep··on RQLite with JSON operators is out
rqlite author here, happy to answer any questions about it.
← PreviousPage 6 of 12Next →