Request and Response
summary
Explains exactly how Rails handles an HTTP request: the Rack call stack, why the router is buried, and why the ENV hash and array response shape force extra allocations and make streaming awkward. Demonstrates a Webrick + H2 integration that returns a simple "Hi Mom" response, proposes migrate ENV hash to Request/Response objects, measures reduced allocations from three to zero for one middleware rewrite, and outlines using HTTP/2 server push via Nginx link headers to speed development.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 5:22HTTP/2 benefits for app devs
- 11:43Rack API role in web dev
- 14:32Rack middleware and Rails flow
- 23:07Rack API limitations
- 29:04Desired Rack API improvements
- 31:12HTTP/2 API integration example
- 34:01Event handlers and Rails integration
- 38:16HTTP/2 challenges and future work
related talks
36mRequest and Response
27mInside Rails: The Lifecycle of a Response
29mHow a Request Becomes a Response
37mRuby on Rack: The Magic Between Request and Response
31mFrom Rails to the Web Server to the Browser
37mInside Rails...
33mRack ‘em, Stack ‘em Web Apps
48mFrom Rails to Rack: Making Rails 3 a Better Ruby Citizen
