Single-Server Django Applications Without Process Overhead
summary
Claim: a single process can run Django web workers and background tasks without separate brokers by using Python 3.14 subinterpreters and Django 6 tasks. Prototype uses Hypercorn, a custom subinterpreter queue backend and in‑memory queues (demo shows multiple subinterpreters handling web requests and task workers and broadcasting messages successfully). Works for pure‑Python stacks and can switch to a database backend to scale, but has limits: C extensions (numpy, pydantic) lack multi‑init, file‑descriptor aliasing and startup sequencing are tricky, and memory/monitoring are still unknown.
AI-written summary · about
chapters (11)
- 0:00Introduction and motivation
- 2:33Why defer processing in Django
- 7:55Python sub interpreters overview
- 10:44Django task framework
- 13:37Combining sub interpreters and Django tasks
- 15:49Single-process web server binding
- 16:09Live demo walkthrough
- 19:22Scaling and error handling
- 20:50Limitations and unknowns
- 21:52Future work and closing thoughts
- 23:19Q&A session
