From Rails to the Web Server to the Browser
summary
Shows exactly how an HTTP request travels from browser to Rails and back, walking through Rack’s three-element contract, Thin’s EventMachine connection, and the C-based mongrel parser. Builds a tiny EventMachine server that parses raw requests, calls the Rack application, formats the HTTP response and proves it by mounting a mounted Rails app and running a test that passes. Defaults like listening on port 9292 appear and the homemade server works end to end.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:31MagmaConf
- 6:44rackup
- 7:30All Rails apps are Rack apps
- 14:38Down the Rabbit Hole
- 15:15thin start
- 17:13EventMachine
- 19:13Thin::Request
- 19:23lib/thin/request.rb
- 19:42Mongrel Parser
- 22:54Unicorn
- 25:24Our own Webserver
- 29:55Be curious








