~/talk

Building a NoGIL Load Balancer in 30 minutes

Talkat PyCon US 2025 · 2025-05-16..05-18· [python, web-performance]
links:none on file
slides:none on file

Live codes a threaded Fibonacci server, then swaps to a free‑threaded CPython build and a simple proxy load balancer, with concrete stress tests showing 24k–34k req/s on short requests and throughput collapse when a single long request holds the CPU. Demonstrates that removing the GIL yields better scaling for CPU‑bound work, but not for IO‑dominated fast requests (no GIL scales better when CPU‑bound). Finds an unexpected mutex inside random() that throttles concurrency (random() lock caused bottleneck).

AI-written summary · about

  1. 0:00Introduction
  2. 7:36Stress Test
  3. 11:58NoGIL Test
  4. 14:20Load Balancer
  5. 16:43Test
  6. 17:35Random
  7. 18:25Load Connection
  8. 28:30Conclusion
~/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.