Ian Lewis
Ian Lewis is a web developer living in Tokyo Japan. His current interests are in Django, python, alternative databases and rapid web application development. About Me...

A Million-user Comet Application with Mochiweb

Richard Jones has started an interesting series to talk about scaling comet web applications using MochiWeb: In this series I will detail what I found out empirically about how mochiweb performs with lots of open connections, and show how to build a comet application using mochiweb, where each mochiweb connection is registered with a router which dispatches messages to various users. We end up with a working application that can cope with a million concurrent connections, and crucially, knowing how much RAM we need to make it work. In part one: Build a basic comet mochiweb app that sends clients a message every 10 seconds. Tune the Linux kernel to handle lots of TCP connections Build a flood-testing tool to open lots of connections (ye olde C10k test) Examine how much memory this requires per connection. Future posts in this series will cover how to build a real message routing system, additional tricks to reduce memory usage, and more testing with 100k and 1m concurrent connection...
View original article...
1 year ago

blog comments powered by Disqus