TE
TechEcho
StartseiteTop 24hNeuesteBesteFragenZeigenJobs
GitHubTwitter
Startseite

TechEcho

Eine mit Next.js erstellte Technologie-Nachrichtenplattform, die globale Technologienachrichten und Diskussionen bietet.

GitHubTwitter

Startseite

StartseiteNeuesteBesteFragenZeigenJobs

Ressourcen

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. Alle Rechte vorbehalten.

Litestream: Revamped

449 Punktevon usrmevor 5 Tagen

33 comments

maxmcdvor 5 Tagen
Looks like the code is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;benbjohnson&#x2F;litestream&#x2F;tree&#x2F;v0.5">https:&#x2F;&#x2F;github.com&#x2F;benbjohnson&#x2F;litestream&#x2F;tree&#x2F;v0.5</a><p>Really nice to see this, I wrote this comment almost 2 years ago when I was a little miffed about trying to use litestream and litefs: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37614193">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37614193</a><p>I think this solves most of the issues? You can now freely run litestream on your DB and not worry about issues with multiple writers? I wonder how the handoff is handled.<p>The read replica FUSE layer sounds like a real nice thing to have.<p>edit: Ah, it works like this: <a href="https:&#x2F;&#x2F;github.com&#x2F;benbjohnson&#x2F;litestream&#x2F;pull&#x2F;617">https:&#x2F;&#x2F;github.com&#x2F;benbjohnson&#x2F;litestream&#x2F;pull&#x2F;617</a><p>&gt; When another Litestream process starts up and sees an existing lease, it will continually retry the lease acquisition every second until it succeeds. This low retry interval allows for rolling restarts to come online quickly.<p>Sounds workable!
simonwvor 5 Tagen
This post is like they read my mind and implemented <i>everything</i> I wanted from a new Litestream. So exciting.
thewisenerdvor 5 Tagen
ben, thanks for litestream!<p>we&#x27;re using it on production for a write-heavy interal use-case (~12GB compressed) for more than a year now; and it&#x27;s costing us a couple hundred pennies per month (azure).<p>excited to try the new changes when they land.
评论 #44057717 未加载
bradgesslervor 5 Tagen
I wish Fly would polish the developer experience on top of SQLite. They&#x27;re close, but it&#x27;s missing:<p>1. A built-in UI and CLI that manages SQLite from a volume. Getting the initial database on a Fly Machine requires more work than it should.<p>2. `fly console` doesn&#x27;t work with SQLite because it spins up a separate machine, which isn&#x27;t connected to the same volume where the SQLite data resides. Instead you have to know to run `fly ssh console —pty`, which effectively SSH&#x27;s into the machine with the database.<p>The problem in general with SQLite web apps is they tend to be small apps, so you need a <i>lot</i> of them to make a decent amount of money hosting them.
评论 #44047611 未加载
评论 #44047034 未加载
jasonthorsnessvor 5 Tagen
What a coincidence, I was just researching Litestream today! I use Sqlite on my VPS and was thinking about adding this.<p>Am I understanding correctly that I will be able to restore a database to any point-in-time that is while the litestream process is running? Because auto-checkpointing could consume the WAL while it isn&#x27;t running?<p>So for an extreme example if the process crashed for an hour between 2:00 and 3:00, I could restore to 1:55 or 3:05 but the information required to restore between 2:00 and 3:00 is lost?
评论 #44046420 未加载
评论 #44049513 未加载
psanfordvor 5 Tagen
This looks great! A few years ago I wrote a sqlite vfs for using dynamodb as a backing store[0] called DonutDB. With the recent addition of CAS to S3, I was thinking about making a new version of DonutDB backed by S3. I&#x27;m really glad lightstream supports this so I don&#x27;t have to!<p>I can&#x27;t wait to try this out.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;psanford&#x2F;donutdb">https:&#x2F;&#x2F;github.com&#x2F;psanford&#x2F;donutdb</a>
评论 #44047747 未加载
ignoramousvor 5 Tagen
<p><pre><code> We have a sneaking suspicion that the robots that write LLM code are going to like SQLite too. We think what coding agents like Phoenix.new want is a way to try out code on live data, screw it up, and then rollback both the code and the state. </code></pre> Prescient.<p>Agents would of course work well if they can go back in time to checkpoints and branch from there, exploring solutions parallely as needed.<p>Anyone who has experience with building workflows (Amazon SWF, Temporal, and the like) knows how difficult it is to maintain determinism in face of retries &amp; re-drives in multi-tier setups (especially, those involving databases).<p>Replit recently announced their Agent&#x27;s integration with Neon&#x27;s <i>time travel</i> feature [0] for exactly the purpose outlined in TFA. Unlike Fly.io though, Replit is built on GCP and other 3p providers like Neon and it is unclear if both GCP &amp; Databricks won&#x27;t go all Oracle on them.<p>[0] <a href="https:&#x2F;&#x2F;blog.replit.com&#x2F;safe-vibe-coding" rel="nofollow">https:&#x2F;&#x2F;blog.replit.com&#x2F;safe-vibe-coding</a>
hobo_markvor 5 Tagen
If you wanted to use litestream to replicate many databases (ideally, one or more per user), which is one of the use cases described here (and elsewhere), how do you tell litestream to add new databases dynamically? The configuration file is static and I haven&#x27;t found an API to tell it to track a new db at runtime.
评论 #44046822 未加载
srameshcvor 5 Tagen
I have been following Ben for a long time but I never knew LiteFS was based on his work. I somehow settled eventually for rqlite for self managed distributed.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;rqlite&#x2F;rqlite">https:&#x2F;&#x2F;github.com&#x2F;rqlite&#x2F;rqlite</a>
评论 #44046775 未加载
wg0vor 4 Tagen
&gt; Now that we’ve switched to LTX, this isn’t a problem any more. It should thus be possible to replicate &#x2F;data&#x2F;*.db, even if there’s hundreds or thousands of databases in that directory.<p>That was the show stopper. Now multi tenant with per tenant database whee (in theory) each user can roll back to certain point in time or at least completely download their database and take away for whatever they want to do with it is going to be possible.
wimvor 4 Tagen
Very cool! This is so clever and makes deploying it so simple. I just wasn&#x27;t able to use it yet because we&#x27;d have (many) thousands of SQLite DBs to backup. I quickly hacked something together using fanotify + SQLite&#x27;s Backup API to have some copies at least, but I&#x27;m going to try to switch to Litestream if this amount of files would be supported by the wildcard replication.
radsvor 4 Tagen
What will be required from users of the existing Litestream version to upgrade to the new one? Is it a matter of bumping the version when it comes out or is there more to it?
JSR_FDEDvor 4 Tagen
Will the new litestream work with object stores that don’t provided conditional writes?
Skinneyvor 4 Tagen
If I’m deploying a new version of my app, the typical managed solution will spawn a new server instance with that new version, and once a health check has succeeded a couple of times it will reroute trafic to this new instance and kill the old one.<p>Previously this would be problematic, as the new instance might miss changes made by the old server. Is this fixed by these new changes?
评论 #44057055 未加载
评论 #44052565 未加载
malkiavor 4 Tagen
So fossil (which is built on top of sqlite) + this = SCM?
评论 #44049160 未加载
mythzvor 4 Tagen
Awesome stuff, this resolves my #1 feature request of being able to replicate an entire directory of SQLite *.db&#x27;s from a single Litestream process - happy it&#x27;s finally here.<p>Should make replicating Multi tenant per-user SQLite databases a lot more appealing.
评论 #44049711 未加载
neomvor 5 Tagen
Is Litestream on a path to subsume LiteFS&#x27;s capabilities? Re: PITR, would this be used to facilitate automated A&#x2F;B testing of AI-generated code changes against live data subsets? I can imagine a lot of cool stuff in that direction. This is really cool Ben!
j0e1vor 5 Tagen
This is exciting! Especially glad that Litestream is still maintained. Is there a use-case for Litestream for more than backup? I am a fan of offline-first but it would be cool to have a way to synchronize on-device SQLite instances to a single central instance.
评论 #44046405 未加载
bambaxvor 4 Tagen
Very cool!<p>There may be a typo here:<p>&gt; <i>The most straightforward way around this problem is to make sure only one instance of Litestream can</i> replication <i>to a given destination.</i><p>Can replicate? Or can do replications?
wiradikusumavor 4 Tagen
For Fly.io employees here: Can I finally replace my Postgre with this a&#x27;la Cloudflare D1 (which is also Sqlite based)?
Nelkinsvor 4 Tagen
Does anybody have a list of which S3-compatible object storage providers support Compare-And-Swap?
rawkodevor 5 Tagen
Amazing to see and hear about the progress. Always a pleasure when Ben works on something and shares it. Keep it up!
nodesocketvor 5 Tagen
Is there a migration guide from stable to the branch 0.5? I’m running Litestream as a Docker sidecar alongside my Python app container and it’s been great and a nice comfort knowing my SQLite db is backed up to S3.
oliwaryvor 5 Tagen
Fantastic to see it&#x27;s getting updated! I am a big fan of litestream, have been using it for a while together with pocketbase. It&#x27;s like a cheat code for a cheap, reliable and safe backend.
ChocolateGodvor 4 Tagen
&gt; It will be able to fetch and cache pages directly from S3-compatible object storage.<p>Does this mean your SQLite database size is no longer restricted by your local disk capacity?
评论 #44049813 未加载
fravor 5 Tagen
Litestream has seen very little development lately and I was worried it was dead. Very glad to see Ben Johnson is continuing to push the project forward with some exciting new plans.
评论 #44049455 未加载
评论 #44047630 未加载
评论 #44049263 未加载
dastbevor 4 Tagen
asking since ben does take a look here...<p>will revamped litestream have a solution for ACKing only when transactions have durably committed to storage?
caleblloydvor 5 Tagen
Is the backend pluggable? Could it be configured to write to any key value store with support for optimistic concurrency control?
评论 #44046398 未加载
yowmamasitavor 4 Tagen
tangent: in modern SQLite, are writes still serialized? That&#x27;s my main concern when choosing a tech stack for an app that might have thousands of writes happening on peak periods
评论 #44047271 未加载
评论 #44053970 未加载
评论 #44047665 未加载
m3stavor 4 Tagen
Is there anything like Livestream that can be just pip installed?
nicovor 5 Tagen
Very cool idea, I wonder if that works better than their Postgres instances<p>Recently, I deployed a little side project using a small postgres vm on fly.io After a couple of days, and only having about 500kb of data stored in that db, the postgres vm went into an unrecoverable fail loop, saying it ran out of memory, restarting, then immediately running out of memory again, so on and so forth<p>It took about 3-4hrs to recover the data jumping through a lot of hoops to be able to access the data, copy it to another volume and finally download it<p>I would&#x27;ve reached for support, but it seems like the only option available is just posting on their forum. I saw a couple of related posts, all with unsatisfactory answers unfortunately<p>To be fair, it was incredibly easy to get up and running with them. On the other hand, almost all the time I saved by that quick start, was wasted recovering the failing db, all the while my site was down<p>Ironically, I originally developed the project using sqlite, but then switched to postgres to deploy
评论 #44046438 未加载
评论 #44046285 未加载
评论 #44047739 未加载
评论 #44050107 未加载
评论 #44047029 未加载
gavinrayvor 5 Tagen
Just a heads-up, the link in the &quot;Litestream is fully open source&quot; callout is malformed and leads to:<p><a href="https:&#x2F;&#x2F;http&#x2F;&#x2F;litestream.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;http&#x2F;&#x2F;litestream.io&#x2F;</a>
评论 #44046439 未加载
评论 #44047598 未加载
mixmastamykvor 5 Tagen
For something rather new there seems to be too many choices already. Please pick a strategy under one name, good defaults, and a couple of config options.
评论 #44047607 未加载