Briefing

Lobste.rs migrates to SQLite, cutting costs and improving performance

hosting

Lobsters moved from MariaDB to SQLite, reducing CPU, memory, and VPS costs while improving speed.

What to do now

Consider using SQLite for lightweight Rails apps to cut hosting costs.

Summary

Lobste.rs completed a migration from MariaDB to SQLite, aiming to reduce hosting costs and improve performance. The migration involved a single VPS running a Rails application with a 3.8 GB primary SQLite database, a 1.1 GB cache database, a 218 MB queue database, and a 555 MB rack_attack database. CPU and memory usage dropped, and the site felt snappier to the author. The VPS cost was halved by removing the MariaDB instance. The migration PR added 735 lines and removed 593 lines across 30 commits and 188 files. The change was built on earlier PRs #1705, #1871, and #1924. The author notes that SQLite can support a full community site in 2026. This case study demonstrates the feasibility of lightweight databases for web applications.

Key changes

  • Primary SQLite database 3.8 GB
  • Cache database 1.1 GB, queue 218 MB, rack_attack 555 MB
  • CPU and memory usage dropped, site snappier
  • VPS cost halved by removing MariaDB
  • Migration PR added 735 lines, removed 593 lines across 30 commits
  • Built on PRs #1705, #1871, #1924

Affects

internal

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting