Refwell has just released a Lighttpd module called FdAjax which is perfect for chat applications. FdAjax has the possibility to send a signal to a chat partner i.e. a signal that informs that your chat partner started to write a message. The signal will come directly through the module and it will omit the application server. You might find it useful

http://www.refwell.com/blog/index.php/category/fdajax/