~/talk

How Puma Works

Talkat RubyConf AU 2023 · 2023-02-16..02-17· [ruby, devops-and-delivery]
slides:none on file

Puma explains how a pre-forking + threaded model actually runs Rails: master forks workers that share a listening socket, each worker has a thread pool that calls the Rack app, and a reactor buffers requests so slow uploads don’t tie threads. It only speaks HTTP/1.x, has ~260 million downloads and ~8,000 lines of code (≈5k Ruby), ships C extensions and miniSSL, and yields ≈2× throughput with a few threads vs one, so the design clearly works in production.

AI-written summary · about

  1. 0:00Introduction
  2. 2:51Puma in Rails popularity
  3. 4:16Design goals and parallelism
  4. 12:14Rack apps with Puma
  5. 18:17Pre-forking architecture
  6. 21:05Thread pools and GIL
  7. 26:05Reactor buffering requests
  8. 27:31Puma codebase and extensions
  9. 30:43Puma classes and architecture
  10. 32:49Maintaining Puma
  11. 35:58Contributing to Puma
  12. 39:11Becoming a contributor
  13. 40:14Closing remarks
~/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.