Get the latest tech news

Rails on SQLite: new ways to cause outages


This post was originally given as a talk for Friendly.rb. The slides are also available. Between Litestack and the Rails 8 trifecta of Solid Cable, Solid Cache, and Solid Queue, it’s easier than ever to spin up a Rails app that doesn’t need a database service, or a redis service, or a file storage service. It’s great to simplify things, but even after 20 years of deploying Rails apps I was still caught out by some of the ways things are different.

Based on what happened when I built a new side project in Rails on SQLite, we’ll cover what’s different, what’s new, and several ways that you can knock your site offline or even destroy your entire production database. This can create quite the queue if even read-only queries have to wait in line and happen one at a time (because if they didn’t have the lock, some writer might sneak in and change the data mid-read!). If you’re okay with the tradeoffs of a distributed system (and you’re okay with the idea of all of your database reads and writes going through a FUSE filesystem that might be adding extra bugs), LiteFS offers a version of the ultimate web application dream.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of outages

outages

Photo of new ways

new ways

Photo of rails

rails

Related news:

News photo

SQLite's Use of Tcl (2017)

News photo

SQLite's File Format

News photo

Nintendo Invents New Ways to Have Fun With Old Characters