frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Rails on SQLite: new ways to cause outages

https://andre.arko.net/2025/09/11/rails-on-sqlite-exciting-new-ways-to-cause-outages/
69•ingve•4h ago

Comments

phamilton•2h ago
I'm sad this project fizzled: https://github.com/losfair/mvsqlite

It had the fascinating property of being a full multi-writer SQL engine when using Page Level Conflict Checking. Even more fascinating: every single client itself becomes a writer.

ncruces•1h ago
The way they got multi-writer working is a bit too adventurous for me.

It involves fiddling the database header to ensure you can keep track of the read-set from the VFS layer, by convincing SQLite to drop its page cache at the start of every transaction.

Other than that, a MVCC VFS is relatively straightforward. Here's an in-memory experiment if a few hundred lines of Go: https://github.com/ncruces/go-sqlite3/blob/v0.29.0/vfs/mvcc/...

I haven't settled on what's a good storage layer for something like this.

tlaverdure•2h ago
> Another implication of having just one single server: there is only one place for network requests to go.

> In the dream SQLite plus LiteFS world, you have all the advantages of SQLite and all the advantages of a fully replicated multi-writer database setup. Any individual server can go down without causing any downtime for the application as a whole, and every user has a full copy of the application and all its data, running extremely close to them.

These are some of the problems I’m working on solving with Litebase (alpha), which runs on SQLite and distributed storage. Most SQLite solutions rely on replicating data between nodes, but I’m taking a simpler approach by using distributed storage for durability, availability, and replication, combined with a lightweight consensus system between primary and replica nodes.

https://litebase.com

I’m working on getting a public alpha ready, but you can check out the project so far. I’ll create a thread on Hacker News once things are ready.

nop_slide•2h ago
Neat! From a high level what's the difference between litebase and Turso?
tlaverdure•2h ago
A lot of similarities but I believe Turso replicates data between nodes.

Litebase writes data to a tiered storage system (local, network, and object) for easier distribution. Using SQLite's VFS API I've also implemented a different type of storage that allows the primary to write data without full consensus with replicas. It's kind of like a multi-versioned log structured merge tree.

pawelduda•2h ago
So that's the new default for Rails? Seems like a new way for people to shot themselves in foot, for those who are used to the usual postgres + separate services setup. Especially that it's advertised as simpler and therefore is tempting to try out without considering such edge cases. I mean, it's the usual route (from my experience) for successful Rails apps to scale horizontally
sosborn•36m ago
Sqlite has always been the default database for Rails, even though it probably hasn't been the most common deployment choice.
dismalaf•24m ago
Kind of but not really. Rails has defaulted to creating a project with an SQLite database in development for awhile now. But the expectation has always been you move to what you need.

SQLite has simply become "good enough" for production. So now you can take that dev default and simply deploy it for apps of a certain size and category if you want.

giveita•2h ago
> I’ve been deploying Rails applications to production since 2004

> I was still caught out by some of the ways things are different.

I feel this is the problem with frameworks, they have to keep evolving and growing and even people who have been doing it 20 years can get caught out.

But the architecture of the Web has basically not changed that much. We are collectively shooting ourselves in the foot.

Definitely not just a Rails thing.

polyrand•1h ago
A bit off topic but:

  The reason for the "lite" in the name is that it doesn’t run a separate process, it doesn’t listen on a port or a socket, and you can’t connect to it.
The name doesn't really contain "lite". It's SQL-ite. So the suffix is "ite":

  The suffix "ite" is derived from the Greek word lithos (from its adjectival form -ites), meaning rock or stone [0]

[0]: https://english.stackexchange.com/a/34010
chuckadams•1h ago
From the horse's mouth (Hipp's): "I wrote SQLite, and I think it should be pronounced "S-Q-L-ite". Like a mineral. But I'm cool with y'all pronouncing it any way you want. :-)"

Me, I say "sequeLITE" with the emphasis on the last syllable, but now I'm thinking of switching to "SEQuelite". You'll never catch me pronouncing it "ess-cue-ell" either way dammit!

:)

christophilus•1h ago
Yeah the first time I heard Hipp pronounce it, my brain glitched.
nikodunk•1h ago
Very well written and reasoned article. I’ve struggled with a lot of the same issues with SQLite prod deployments. They appear simple, but then after you’ve ensured your file is on non-ephemeral storage, sorted out backups, and thought about vertical scaling or having separate dbs for jobs and models, a lot of the benefits over psql disappear IMO.

The main benefit over psql of course being that you don’t need to pay for a hosted db like RDS, or have a separate database server.

I’ve found a happy middle ground in simply self-hosting psql and my apps on the same VPS with something like dokploy. Local development is still easy enough, and remote deployment in containers is 1-click with Dokploy, and ends up being simpler to reason about IMO. My take below, if anyone’s interested.

https://nikodunk.com/2025-06-10-diy-serverless-(coreos-+-dok...

christophilus•1h ago
This is the way. I used to do the same way back in my ASP (not dotnet) days, only with SQL Server. Hosting the db alongside the app server turned out great, even though you’re always advised against it.
graemep•1h ago
Sqlite is a bad fit for anything where ephemeral storage is the default. On the other hand is you use a simple VPS there is no problem.

There are multiple simple ways of doing SQLite backups https://sqlite.org/lang_vacuum.html#vacuuminto https://sqlite.org/rsync.html - or just lock and copy the file.

If you need to scale enough that it is a concern, then its not a good fit for your use case.

degamad•50m ago
> If you need to scale enough that it is a concern, then its not a good fit for your use case.

If you need to scale writes.

tracker1•28m ago
Cool, I've used Dokku similarly, but I'll usually still reach for a dbms myself a lot of the time. I have used SQLite when I need something portable, just not so much for an application that I'm containerizing anyway.

Been following the Cloudflare features with interest along the way... currently have a pretty good size VPS I've been using.

jemmyw•1h ago
I don't really understand the current trend of using sqlite in place of a traditional database. It has it's place, I use it in a client side project and it's really great, although even there I have to be aware of the one writer only limitation.

20 years ago it was MySQL and now it's usually postgres, and these are both still fine. Easier than ever to get setup and going in production. Outside of quite niche needs, I can't understand why one would put up with the pain of using sqlite. Plus it's setting up an even more painful migration later if you do grow.

benjiro•21m ago
> I don't really understand the current trend of using sqlite in place of a traditional database. It has it's place, I use it in a client side project and it's really great

I think its more about the issue that databases like postgres are too much "magic". With Sqlite you see your database file, its a physical something. You want to move it to another server, its just a copy action, no dump/restore. You want to "upgrade", there is no mess like with postgres.

You want to create client separation, ... its just a file per client.

> although even there I have to be aware of the one writer only limitation.

The writer limit has not been a limit forever. You can easily do 20k writes per second, what is way beyond what most system anyway. You want 100k? A slightly different access pattern and voila. You want 1 million ... There are ways around it. If you put Sqlite vs Postgres for instance, ironically, seen Sqlite winning against postgres despite that single writer.

The whole hands on "we know what file is, where it is, and how to gain access to it" is really amazing. The whole "do not need to think about how to secure it on the network" also helps a lot.

Do i use Sqlite in production? No ... Postgres its extension support just rules. But i see the appeal for many.

jemmyw•8m ago
> I think its more about the issue that databases like postgres are too much "magic"

The problem with that thought is that in order for sqlite to be as full featured as it is, it also has a lot of "magic". I've also had to dive into the postgres code a few times to understand how it's doing something, and I've generally found it well structured and easy to navigate, and surprisingly terse - there's not that much "magic" really.

hruk•3m ago
All databases are painful in their own way. I've used all three at various times in my career, and I think SQLite behaves quite predictably, which has made it a lot easier for me personally to administrate.

If I had to start something new, I'd use SQLite until at least high 5 digit queries per second. Maybe more.

richjdsmith•39m ago
Switching all my projects from psql to SQLite was a bit of a PITA but has absolutely been worth it. Keeping with the “do it the rails way” has kept mental overhead low, and seems to jive well with using LLMs.
SchwKatze•3m ago
Just use Turso

Top model scores may be skewed by Git history leaks in SWE-bench

https://github.com/SWE-bench/SWE-bench/issues/465
266•mustaphah•4h ago•88 comments

Fartscroll-Lid: An app that plays fart sounds when opening or closing a MacBook

https://github.com/iannuttall/fartscroll-lid
28•gaws•38m ago•5 comments

Danish supermarket chain is setting up "Emergency Stores"

https://swiss.social/@swaldorff/115186445638788782
20•sohkamyung•45m ago•2 comments

Unusual Capabilities of Nano Banana (Examples)

https://github.com/PicoTrex/Awesome-Nano-Banana-images/blob/main/README_en.md
126•SweetSoftPillow•2h ago•68 comments

Claude's memory architecture is the opposite of ChatGPT's

https://www.shloked.com/writing/claude-memory
162•shloked•4h ago•83 comments

Rails on SQLite: new ways to cause outages

https://andre.arko.net/2025/09/11/rails-on-sqlite-exciting-new-ways-to-cause-outages/
69•ingve•4h ago•23 comments

Bulletproof host Stark Industries evades EU sanctions

https://krebsonsecurity.com/2025/09/bulletproof-host-stark-industries-evades-eu-sanctions/
137•todsacerdoti•5h ago•44 comments

Building my childhood dream PC

https://fabiensanglard.net/2168/
23•joexbayer•3d ago•1 comments

Behind the scenes of Bun Install

https://bun.com/blog/behind-the-scenes-of-bun-install
307•Bogdanp•10h ago•100 comments

How Palantir is mapping the nation’s data

https://theconversation.com/when-the-government-can-see-everything-how-one-company-palantir-is-ma...
113•mdhb•2h ago•23 comments

AirPods live translation blocked for EU users with EU Apple accounts

https://www.macrumors.com/2025/09/11/airpods-live-translation-eu-restricted/
166•thm•11h ago•185 comments

NT OS Kernel Information Disclosure Vulnerability

https://www.crowdfense.com/nt-os-kernel-information-disclosure-vulnerability-cve-2025-53136/
93•voidsec•7h ago•22 comments

'Robber bees' invade apiarist's shop in attempted honey heist

https://www.cbc.ca/news/canada/british-columbia/robber-bees-terrace-bc-apiary-1.7627532
100•lemonberry•6h ago•58 comments

Making io_uring pervasive in QEMU [pdf]

https://vmsplice.net/~stefan/stefanha-kvm-forum-2025.pdf
42•ingve•4h ago•2 comments

Doorbell prankster that tormented residents of apartments turns out to be a slug

https://www.theguardian.com/world/2025/sep/08/doorbell-prankster-that-tormented-residents-of-germ...
27•robin_reala•3d ago•2 comments

Adam (YC W25) Is Hiring to Build the Future of CAD

https://www.ycombinator.com/companies/adam/jobs/q6td4uk-founding-engineer
1•HetengAaronLi•5h ago

CRISPR offers new hope for treating diabetes

https://www.wired.com/story/no-more-injections-crispr-offers-new-hope-for-treating-diabetes/
151•manveerc•9h ago•41 comments

Show HN: Making a cross-platform game in Go using WebRTC Datachannels

https://pion.ly/blog/making-a-game-with-pion/
47•valorzard•1d ago•1 comments

Launch HN: Ghostship (YC S25) – AI agents that find bugs in your web app

36•jessechoe10•4h ago•13 comments

Conway's Game of Life, but musical

https://www.hudsong.dev/digital-darwin
140•hudsongr•9h ago•27 comments

A Web Framework for Zig

https://www.jetzig.dev/
51•nivethan•5h ago•2 comments

From burner phones to decks of cards: NYC teens adjusting to the smartphone ban

https://gothamist.com/news/from-burner-phones-to-decks-of-cards-nyc-teens-are-adjusting-to-the-sm...
148•geox•9h ago•138 comments

A tech-law measurement and analysis of event listeners for wiretapping

https://arxiv.org/abs/2508.19825
61•lapcat•6h ago•7 comments

Samsung taking market share from Apple in U.S. as foldable phones gain momentum

https://www.cnbc.com/2025/08/16/samsungs-us-market-share-apple-rivalry-foldable-phones.html
139•mgh2•14h ago•200 comments

Adjacency Matrix and std:mdspan, C++23

https://www.cppstories.com/2025/cpp23_mdspan_adj/
21•ashvardanian•3d ago•12 comments

ApeRAG: Production-ready GraphRAG with multi-modal indexing and K8s deployment

https://github.com/apecloud/ApeRAG
19•earayu•3d ago•8 comments

An engineering history of the Manhattan Project

https://www.construction-physics.com/p/an-engineering-history-of-the-manhattan
112•rbanffy•10h ago•61 comments

Public Suffix List

https://publicsuffix.org/
59•mooreds•3d ago•16 comments

Reshaped is now open source

https://reshaped.so/blog/reshaped-oss
246•michaelmior•13h ago•42 comments

GrapheneOS and forensic extraction of data (2024)

https://discuss.grapheneos.org/d/13107-grapheneos-and-forensic-extraction-of-data
284•SoKamil•10h ago•156 comments