~/talk

Deploying Django migrations at Kraken scale with Tim Bell

Talkat DjangoCon US 2024 · 2024-09-22..09-27· [django, databases]
slides:none on file

Kraken runs ~350 Django apps with over 9,000 migration files, 23 production instances across eight time zones, some tables with billions of rows, and ~150–200 deployments a day, so migrations must avoid long locks and rewrites. The concrete techniques are splitting changes into add constraint not valid then validate constraint, using create index concurrently with Atomic=False or the safer migrate_with_timeouts command from Django PG migration tools, adding backfill jobs that batch and pause, and automating or faking migration state where needed; these tools and processes mostly work but remain a work in progress.

AI-written summary · about

  1. 0:00Django migrations at Kraken scale
  2. 1:27Common deployment issues
  3. 3:16Migrations without downtime
  4. 7:10Slow migrations into steps
  5. 10:00Adding indexes safely
  6. 12:09Backward-compatible migrations
  7. 14:14PostgreSQL locking hazards
  8. 16:21Create index concurrently safely
  9. 17:46Kraken scale challenges
  10. 19:32Failed migrations at scale
  11. 20:54Backfilling large tables
  12. 23:24Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.