~/talk

How to scale old Django apps for free

Talkat PyCon Lithuania 2023 · 2023-05-17..05-20· [django, python]
links:none on file
slides:none on file

Clear claim: using gevent monkey-patching with Django + Gunicorn converts blocking I/O into cooperative green threads so IO-bound endpoints handle far more concurrent requests. Demo app uses two views (CPU-bound summation, IO-bound external sleeper using requests) and shows Gunicorn gevent worker yields about 4x throughput with 10x less memory versus 20 sync workers, while CPU-bound work sees no benefit. Caveats: C extensions like psycopg2 need event-friendly drivers or custom connection pooling, otherwise you get no speedup. Migration removes a bottleneck but exposes other issues.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:06Talk overview and scalability basics
  3. 3:07Processes vs threads limitations
  4. 5:31Python GIL and threading issues
  5. 7:11Green threads explained
  6. 9:31Green threads in web servers
  7. 12:48Async Django without code changes
  8. 16:09Monkey patching and limitations
  9. 16:35Demo app setup
  10. 18:07Benchmark results IO bound
  11. 19:40Benchmark results CPU bound
  12. 20:27Real-world implementation experience
  13. 22:31Dependency considerations
  14. 23:26Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.