Content Preview: rss
9 days ago
I've been working madly on the "headers more" module: http://github.com/agentzh/headers-more-nginx-module And got everything that I want working now. It also has a nice wiki page (which also has brief explanation of the underlying implementation): http://wiki.nginx.org/NginxHttpHeadersMoreModule Our buzzword is that it can rewrite the "Server" output header dynamically! See this: location /foo { more_set_headers "Server: $arg_server"; } Then GET /foo?server=Foo will get a response with the "Server: Foo" header set ;) Input headers can be trivially rewritten as well, including the "Host" header: more_set_input_headers "Host: some-other-host"; Well, the full practical power of this module is out of my current imagination. If you have some crazy uses, please drop me a line ;) Happy Nginx hacking!
12 days ago
Pushed by those cutting-edge users on the Nginx mailing list, I've quickly worked out the "chunkin" module which adds HTTP 1.1 chunked input support for Nginx without the need of patching the core: http://github.com/agentzh/chunkin-nginx-module This module registers an access-phase handler that will eagerly read and decode incoming request bodies when a "Transfer-Encoding: chunked" header triggers a 411 error page in Nginx (hey, that's what you have to pay for avoiding patching the core ;)). For requests that are not in the "chunked" transfer encoding, this module is a "no-op". To enable the magic, just turn on the "chunkin" config option like this: chunkin on; location /foo { ... } .... No other modification is required in your nginx.conf file. (The "chunkin" directive is not allowed in the location block BTW.) This module is still considered highly experimental and there must be some ...
43 days ago
Over the recent weeks, I've been reading a lot of Nginx and its modules' C source code and it's really enjoyable. I've got lots of good ideas in implementing the next generation of OpenResty server based on the Nginx architecture. Well, it's currently my full-time $work anyway. For the sake of testing other modules, experimenting the Nginx internals, and for fun, I've started my first Nginx module named "echo": http://github.com/agentzh/echo-nginx-module It's already quite usable, and it also has a declarative test suite based on Perl's Test::Base. At the moment, LWP is used for simplicity and it's rather weak in testing streaming behavior of Nginx (I'm using "curl" to test these aspects manually for now). I'm considering coding up my own Perl HTTP client library based on IO::Select and IO::Socket (there might be already one around?). Along the way, I'm intentionally heavily commenting my C source in this "echo" module in the hope that ...
68 days ago
I really enjoyed the talks in BJPW2009. Here's the slides for my two talks in this conference: "A Tour of Perl Testing": Browse URL (Firefox required): http://agentzh.org/misc/slides/BJPW2009/perl-testing.xul Download URL (Open perl-testing.xul after extraction): http://agentzh.org/misc/slides/BJPW2009.tar.gz "Introduction to our VDOM & vdom-webkit cluster" Browse URL (Firefox required): http://agentzh.org/misc/slides/taobao-fe/vdomwebkit.xul Download URL (Open vdomwebkit.xul after extration): http://agentzh.org/misc/slides/taobao-fe.tar.gz Hopefully you'll find them interesting ;)
74 days ago
Now that I've joined Taobao.com's SDS department and will be able to work on OpenResty in a full time fashion, I've just worked out a (somewhat) detailed plan for the next generation of the OpenResty server. Well, sorry, this draft is in Chinese since my $manager reads Chinese better: http://www.pgsqldb.org/mwiki/index.php/Nginx_openresty_plan (still being actively updated) After talking with my friend and colleague chaoslawful++ for possible designs of a high performance implementation of the OpenResty server, we finally decided to rewrite OpenResty.pm in pure C and in the form of an nginx module. Here's some highlights of the Chinese project plan given above: Nginx-openresty will remain fully opensource. We want to take full advantage of Nginx's event modle and asynchronous I/O and we don't want backend requests blocking as well. We want to integrate Coco Lua into nginx's event model leveraging coco's C level coroutines, thus leading to transparent ...



