Concepts
These pages explain how ngx_mruby runs Ruby inside nginx: where in the processing of a request each handler runs, how the filters see a response, how a handler waits without blocking the worker, and what lives across requests.
- Request phases: nginx’s HTTP phases in order, and the ngx_mruby directive that runs Ruby in each of them.
- Filters: where the header filter and the body filter of ngx_mruby stand in nginx’s filter chains, and what each one receives.
- Waiting without blocking: how
Nginx::Async.sleepandNginx::Async::HTTP.sub_requestgive the worker back to nginx. - Lifetimes: one
mrb_stateper worker, and what a worker keeps between requests. - Trust boundary: what ngx_mruby trusts, what it treats as client input, and what a script is responsible for.