Shoving Your Application Code Into the Web Server
summary
Shows how to push business logic into OpenResty / nginx using content_by_lua and balancer_by_lua blocks, with concrete examples: a /brew endpoint that returns 418 for coffee or beer, 200 for tea, 400 otherwise, and a Redis-backed balancer that fetches host:port at request time. Demonstrates nonblocking integration via the nginx async API, cites LuaJIT-level performance, real-world use at CloudFlare, testing with busted and test-nginx, and warns about blocking Lua libraries and when to write C extensions.
AI-written summary · about
chapters (6)
- 0:00Start
- 4:51Lua
- 14:01Fragmentation of the Louisville Ecosystem
- 16:39Questions
- 16:53What Prevents Nginx from Becoming the Next Emacs Bloatware
- 19:28Nginx Measurement Tools
related talks
40mNginx + Lua = OpenResty
47mOptimizing nginx – from Beginner to Expert to Crazy
45mNginx: The power within
45mReliable High-Performance HTTP Infrastructure with nginx and Lua
47mDevelopers, Start Your nginx!
01h 30mReference Architecture for Running Modern APIs w/ NGINX Unit & Web Server
21mThe Future of the Dynamic Application Server
03h 16mPUSHing web app performance with HTTP/2
