Top all-time · #4807
Stephen Margheim
Personal blog · fractaledmind.github.ioprogrammingdata
Stephen Margheim writes Fractaled Mind, a personal blog at fractaledmind.github.io about programming and data. Since 2023, 16 different Hacker News readers have linked it 25 times, most often “SQLite on Rails: The how and why of optimal performance”. It is still writing: the last post was on 2026-10-04, and you can follow it by feed.
Too few sampled comments (11) to say how often HN recommends it.?
Why HN links it
HN readers link Stephen Margheim's posts on running SQLite in production, covering backups with Litestream and S3, concurrency, locking, and his SQLite-on-Rails series.
Summarised by Claude from a sample of 11 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
This is my personal site, where I write about Ruby, programming, and any of my varied fascinations.
Most-linked posts?
- SQLite on Rails: The how and why of optimal performance6 people · 7 mentions · first linked 2024-04-16
- Supercharge the One Person Framework with SQLite4 people · 4 mentions · first linked 2024-10-16
- Setting Up Litestream on Debian Linux with DigitalOcean Spaces2 people · 2 mentions · first linked 2023-09-09
- /2023/12/11/sqlite-on-rails-improving-concurrency/2 people · 2 mentions · first linked 2024-03-27
What Hacker News says?
https://fractaledmind.github.io/2024/04/15/sqlite-on-rails-t...
Comment linking /2024/04/15/sqlite-on-rails-the-how-and-why-of-optimal-performance/
on “SQLite Index Visualization”Submitted SQLite on Rails: The how and why of optimal performance as a story · 271 points
HN discussionS3 is acting as a backup, not a data store. The SQLite file is local to the app. This recent post discusses the tradeoffs in more detail and includes metrics. https://fractaledmind.github.io/2024/10/16/sqlite-supercharg...
Comment linking /2024/10/16/sqlite-supercharges-rails/
on “Running an open source app: Usage, costs and community donations”Submitted How (and why) to run SQLite in production as a story · 155 points
HN discussionhttps://fractaledmind.github.io/images/railsworld-2024/111.p... https://fractaledmind.github.io/2024/10/16/sqlite-supercharg...
Comment linking /2024/10/16/sqlite-supercharges-rails/
on “Searchcode.com’s SQLite database is probably 6 terabytes bigger than yours”Submitted Supercharge the One Person Framework with SQLite as a story · 30 points
HN discussionDo you really need concurrency? My understanding is read are like… picoseconds, because everything happens in memory. You don’t have a separate server to call. This guy is great: https://fractaledmind.github.io/2024/04/15/sqlite-on-rails-t...
Comment linking /2024/04/15/sqlite-on-rails-the-how-and-why-of-optimal-performance/
on “Searchcode.com’s SQLite database is probably 6 terabytes bigger than yours”Submitted SQLite on Rails: The how and why of optimal performance as a story · 6 points
HN discussionThe sqlite3 C API very much does not serialize "all operations within a single process." The way threading and concurrency work in SQLite may not mesh well with NodeJS's concurrency model. I dunno, I'm not an NodeJS/libuv expert. But at the C API level that statement is just wrong. Normally you cannot share a single connection across threads. If you compile SQLite to allow this, yes, it'll serialize operations using…
Comment linking /2023/12/11/sqlite-on-rails-improving-concurrency/
on “Supercharge SQLite with Ruby Functions”Submitted Fine-tune your SQLite database for production web app usage as a story · 3 points
HN discussionI went through this presentation looking for "how do you do backups" and it glosses over it. But the author blogged about that separately [1]. It seems he uses Litestream with DigitalOcean Spaces for this. Looks like they start at $5 per month for 250 GB [2]. Would that be the best way for a hobbyist to get started? [1] https://fractaledmind.github.io/2023/09/09/enhancing-rails-s... [2] https://www.digitalocean.com/…
Comment linking /2023/09/09/enhancing-rails-sqlite-setting-up-litestream/
on “How (and why) to run SQLite in production”Submitted Select Dropdown for Polymorphic Associations as a story · 2 points
HN discussionanother article praising sqlite in production and working around a known sqlite limitation: concurrent writes. As they link in the article: > But, my favorite feature of the gem is its improved concurrency support. > [..] https://fractaledmind.github.io/2023/12/11/sqlite-on-rails-i... Really. At the point you are experiencing database locked in your productive app that uses sqlite as backend, i would strongly sugges…
Comment linking /2023/12/11/sqlite-on-rails-improving-concurrency/
on “How (and why) to run SQLite in production”Submitted SQLite on Rails: The how and why of optimal performance as a story · 2 points
HN discussionStephen has a whole series of blog posts on SQLite (in Rails) that I highly recommend. I've learned most of what I know about SQLite from him! https://fractaledmind.github.io/2024/04/15/sqlite-on-rails-t... Also, hello Lee! I miss being in a Slack with you!
Comment linking /2024/04/15/sqlite-on-rails-the-how-and-why-of-optimal-performance/
on “Django SQLite Production Config”Submitted Solid Errors as a story · 2 points
HN discussionThere are benefits to having a single writer connection (and multiple readers). One is that you can get fairer and more efficient locking. The (interruptible) file lock APIs that SQLite uses lead to a lot of sleeping and retrying that wastes time, and is not very fair. https://fractaledmind.github.io/2024/07/19/sqlite-in-ruby-ba... Another some APIs, like the backup API, work better if they can track writes, and (e.…
Comment linking /2024/07/19/sqlite-in-ruby-backoff-busy-handler-problems/
on “SQLite is not a single connection database”Submitted PlanetScale-style database branching for Rails and SQLite with 2-lines of code as a story · 2 points
HN discussionMissing from this, but very important: you can connect to the same SQLite database file multiple times inside the same process (e.g. in different threads) but you can also connect to the same SQLite database file from multiple different processes on the same machine (with the same filesystem - NFS will lead to all kinds of nasty problems). Easy way to prove this to yourself: run two different terminals, run "sqlite3…
Comment linking /2024/04/15/sqlite-on-rails-the-how-and-why-of-optimal-performance/
on “SQLite is not a single connection database”Submitted Enhancing your Rails app with SQLite: Installing extensions as a story · 1 points
HN discussionI don't know about 1TB data but I think it was used in some missile system so I would say yes for mission critical data, not sure if we think about mission critical in the same terms. Edit: by pure chance I hit that just a moment ago: https://fractaledmind.github.io/2024/10/16/sqlite-supercharg...
Comment linking /2024/10/16/sqlite-supercharges-rails/
on “35% Faster Than the Filesystem (2017)”Submitted SQLite Myths: Linear writes don't scale as a story · 1 points
HN discussionSubmitted Setting Up Litestream on Debian Linux with DigitalOcean Spaces as a story · 1 points
HN discussionSubmitted Loading SQLite Extensions in Rails as a story · 1 points
HN discussion