A New Power-Magnet 2

Posted by jan Sat, 16 Sep 2006 10:56:00 GMT

In mod_cml is dead, long live mod_cml I gave some hints about mod_cml going to die soon. With lighttpd 1.4.12 there will be a new module called mod_magnet can attract every request and decide on its further execution.

If you want you implement most of our current modules via mod_magnet, e.g.:

Instead of inventing a new language as I did for the first versions of mod_cml we used lua again. Lua is a simple, performant, light and extensible language. Pretty much what your lighty is for web-servers.

Thanks to the help of the #lua channel in freenode especially rici I could implement the basic magnet-engine over the weekend. On http://p.caboo.se/12501 you can see the first version of the code-cache that is giving mod_magnet its performance.

While most of the configuration in lighty needs a restart of the server to get activated, mod_magnet reloads its scripts when you change them. The scripts itself are compliled once and executed on each request. Thanks to the architecture of lua it was very easy to implement the this byte-code cache, mOo had to write a while until his XCache worked nicely with php.

And now ? Try it out, get the 1.4.12 (or the last pre-release) and tell us how you like it.

Trackbacks

Use the following link to trackback from your own site:
http://blog.lighttpd.net/articles/trackback/1995

  1. The crash reported in #876 is critical enough to fire another release shortly after 1.4.12 was released. It also contains some minor bugfixes and a better check for lua 5.1. If you are running on Debian you can compile mod-magnet with —with-...
Comments

Leave a response

  1. David Bullock Sat, 16 Sep 2006 21:42:01 GMT
    VERY exciting to hear it reloads the config files on change - any hope of Lighty doing the same thing with it's config files? I have replaced Apache organization wide with Lighty and the only drawback is changes to the configs of our download servers and I hate restarting the server and killing transfers in progress to pick up the new configuraiton.
  2. Jan Kneschke Sun, 17 Sep 2006 11:07:48 GMT
    You can use SIGINT to do a graceful shutdown, see http://blog.lighttpd.net/articles/2005/09/02/graceful-restart
Comments