行业精选

lobste.rs 完成从 MariaDB 到 SQLite 的迁移

lobste.rs is now running on SQLite

精选理由

Lobsters 把数据库从 MariaDB 换成了 SQLite,性能更好成本更低,单服务器就跑起来了,对想简化运维的团队很有参考价值。

AI 摘要

lobste.rs 社区网站于 2026 年 7 月完成从 MariaDB 到 SQLite 的数据库迁移。迁移后 CPU 和内存使用率下降,网站响应更快,VPS 成本降低一半。主 SQLite 数据库文件约 3.8GB,另有缓存、队列和防滥用数据库。迁移涉及 30 个提交、188 个文件,新增 735 行代码,删除 593 行。

原文 · Simon Willison’s Weblog

lobste.rs is now running on SQLite

lobste.rs is now running on SQLite Community site Lobsters has been planning a migration away from MariaDB since August 2018 - originally targeting PostgreSQL, but last year they decided to investigate SQLite instead. This weekend they completed the migration, and now consider it stable enough that it looks like this is the permanent architecture for the site going forward: SQLite seems to have passed with flying colors: cpu usage is down, memory usage is down, site seems to be snappier at least for me, 1/2 the vps cost once mariadb vps is taken down The Lobsters Rails application now runs on a single VPS, with a primary content SQLite database file that's around 3.8GB. There's also a 1.1GB cache database, a 218MB queue database, and a still growing 555MB rack_attack database used by the Rack::Attack middleware for blocking and throttling abusive requests. There are plenty more details in both the linked thread and this SQLite migration PR by Thomas Dziedzic, which added 735 lines and removed 593 lines across 30 commits and 188 files. That PR built on top of previous PRs #1705 , #1871 , and #1924 . This is a really useful case study, and a great reminder that you can get a whole lot done with a single server and SQLite in 2026. Tags: migrations , ops , rails , sqlite , lobsters

lobste.rs 完成从 MariaDB 到 SQLite 的迁移 · AI 热点