TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Strong Consistency with Raft and SQLite

114 pointsby marcobambiniabout 2 years ago

11 comments

eatonphilabout 2 years ago
I&#x27;m not an expert and every distributed database is different. My intuition about strapping a consensus library to a database is that you&#x27;re going to have way higher latency because every operation, writes and reads, must go through consensus. (IIRC some databases like Cockroach mitigate this by having many mini Raft clusters rather than one single one [which IIRC is how rqlite works anyway].)<p>The advantage you undeniably get is durability&#x2F;high availability.<p>&gt; Scalability: Distributed databases can be scaled horizontally by adding more nodes to the network, making handling larger amounts of data and higher volumes of requests easier.<p>This is only possible if you have a data partitioning scheme, right? But data partitioning is sort of a different problem from consensus&#x2F;HA, right? If you do the simplest version of a consensus + database implementation, every disk on every instance of the consensus cluster is basically identical. So you don&#x27;t benefit in that simple approach from adding more disks. It potentially just makes write latency worse unless you do flexible quorums so the quorum size is independent of the number of nodes in the cluster?<p>&gt; Localized access: With a distributed database, data can be stored closer to the users who need it, which can improve response times and reduce network latency.<p>This would also only be true if you relax consistency requirements, right? If you need to be at the highest level of consistency you must send reads through consensus too otherwise if you read from the node nearest you it may be out of date.<p>It would be cool to see some numbers about the difference between latency of reads&#x2F;writes in sqlitecloud and sqlite on a single node! It would help my intuition anyway.
评论 #35254600 未加载
评论 #35247730 未加载
评论 #35293163 未加载
评论 #35252703 未加载
lukevabout 2 years ago
Seems similar to <a href="https:&#x2F;&#x2F;github.com&#x2F;rqlite&#x2F;rqlite">https:&#x2F;&#x2F;github.com&#x2F;rqlite&#x2F;rqlite</a> or <a href="https:&#x2F;&#x2F;dqlite.io" rel="nofollow">https:&#x2F;&#x2F;dqlite.io</a>.<p>Would be interesting to see a breakdown of the differences.
评论 #35247799 未加载
jcutrellabout 2 years ago
Totally unrelated to the content, but it&#x27;s interesting to see these types of articles clearly using something like Midjourney to generate their header images. It almost feels like a dream-state when I first land on the page... my brain can&#x27;t totally parse what I&#x27;m looking at on this one, for example. For me, that was actually pretty distracting.
lmcabout 2 years ago
Marco, you&#x27;re probably going to want to rethink your branding. It sounds like you&#x27;re associated SQLite officially, when AFAIK this isn&#x27;t the case (?)<p>The code is open source, but the name is a registered trademark. Similar issue here: <a href="https:&#x2F;&#x2F;github.com&#x2F;vapor&#x2F;sqlite-kit&#x2F;issues&#x2F;47">https:&#x2F;&#x2F;github.com&#x2F;vapor&#x2F;sqlite-kit&#x2F;issues&#x2F;47</a>
评论 #35251099 未加载
robertlagrantabout 2 years ago
I&#x27;m curious about sending changesets instead of commands.<p>I get there are some things are nondeterministic, but I&#x27;m surprised that they couldn&#x27;t be converted into deterministic commands before sending them out. E.g. send the result of `RANDOM()` instead of the call itself.<p>I don&#x27;t know how much that would buy you, but I&#x27;d imagine it might make the amount of information to send much smaller.
aeyesabout 2 years ago
Where are the specs of the offering?<p>I couldn&#x27;t find information on the maximum DB size, maximum number of connections, network throughput, datacenter locations and other basic information. The screenshot on the homepage clearly shows that there is a disk and CPU limitation.<p>It looks like this is a database with an SQLite API but internally it could be anything.
xrdabout 2 years ago
I love that the rqlite author has chimed in here.<p>Anyone know how this compares to the work done by litestream: <a href="https:&#x2F;&#x2F;litestream.io&#x2F;how-it-works&#x2F;" rel="nofollow">https:&#x2F;&#x2F;litestream.io&#x2F;how-it-works&#x2F;</a><p>Is this a fundamentally different idea: consistency vs. replication?
评论 #35249874 未加载
conqrrabout 2 years ago
The most interesting thing for me in this is the article implies that they offer globally distributed consensus. Not sure if this is their actual offering too, but the example of NYC and Signapore implies this. While reads would be fine, the latency for writes could be atleast 2*250ms (roughly the speed between furthest AWS regions). I can still see this useful for applications that require strong consistency and global distribution, but likely a niche. Would be real interesting to see some actual numbers!
评论 #35248744 未加载
AYBABTMEabout 2 years ago
Is this somehow related to rqlite? <a href="https:&#x2F;&#x2F;rqlite.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rqlite.io&#x2F;</a><p>The architecture is very similar.
评论 #35247833 未加载
VWWHFSfQabout 2 years ago
I see a lot of this kind of stuff but does anybody know what the actual DBA&#x2F;SA story is for some big SQLite cluster? What if you have a non-trivial amount of data and you actually care about it? Do you just have a bunch of 800 gigabyte db.sqlite files sitting around?
评论 #35250766 未加载
评论 #35254023 未加载
justincliftabout 2 years ago
Looking at the SQLite Cloud repo on GitHub, it seems like the docs and SDK are open sourced.<p>Is there a plan to Open Source the server side code as well? :)