Some doubts on dqlite usage #658
Replies: 1 comment
-
Hi Arun, thanks for your questions.
dqlite does link to SQLite and use it under the hood, but it's not a drop-in replacement. It doesn't expose an API that's compatible with the sqlite3 one,
You could have a cluster with only one voting node (which is then also the Raft leader) and several "standby" nodes. In this case writes don't go through a consensus process, they're committed and acknowledged as soon as the leader executes them, and the standbys receive the changed data asynchronously. Note that in this configuration, if the leader crashes, the standbys won't be able to step up to replace it; you'd have to restart the leader or use the manual cluster recovery process. You can also lose data if the leader fails, since it's not guaranteed to be replicated to any of the standbys. Also note that even in a standard dqlite cluster with three voting nodes, only one of those is the leader at any given time, and all reads and writes go to that leader.
The process of getting a node up to date with the latest transactions is asynchronous (it doesn't happen all-at-once at startup). Since clients are intended to send their reads and writes to the current leader, they don't have to wait for other nodes to join the cluster unless those nodes are required for consensus. For example, if you have a cluster with three voters and you take two of them down, you won't be able to run any transactions until one of them is brought back online.
dqlite is used by LXD and MicroK8s and it's in the process of being adopted by Juju
No, dqlite doesn't support being used in this way. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thanks for this cool tool.
Iam trying to find a simple replicated database for my application that will be mostly deployed as a 2 node solution. dqlite definitely seems to fit the bill, but i had a few doubts post reading the docs.
If someone could help answer this, it would be of a great help to us
I assume dqlite embeds the original sqlite and is a drop in replacement in all environments that support sqlite - is this understanding correct ?
Can i use dqlite in a single master and multiple slaves mode ? I assume an odd number of nodes is required only when there are multiple writers ?
When application starts up, how does dqlite re-sync all the data ? Will the application be blocked while dqlite does this ? Or iis this process asynchronous in nature?
How many releases of DqLite are in the field and are there any citeable customers/products currently using dqlite in production ?
ps : I know python 3 comes embedded with the SQLite - if i set up the LD_LIBRARY_PATH to have dqlite, will it be used instead of the include SQLite from python ?
Thanks
Arun
Beta Was this translation helpful? Give feedback.
All reactions