Over the next few releases, we’re going to be phasing out our use of the Apache web server in favor of LightTPD. If any of you are familiar with the Ruby on Rails open source framework, you’ll probably recognize the name. LightTPD is a designed to be a less CPU-intensive web server than Apache. For an application like meebo, where the number of simultaneous users and user requests is quite high, our servers can’t afford to buckle under heavy loads. Meebo users range from college students on fiber lines, to librarians on DSL, to people on dial-up — with so many users simultaneously requiring processing and such a wide range of connection speeds, meebo’s web servers have to handle quite a bit.
Apache has been around quite a while, and it’s pretty much the web server that everyone uses. However, LightTPD is fast becoming a recommended alternative, as it has a very small memory footprint and consumes far less memory than Apache does on a regular basis. Apache runs in the traditional fork/exec model, where the server itself is more geared towards process-intensive activity; this differs from the event-driven model of LightTPD (single process/single threaded). For those who are interested in really scalable web servers and learning about the different models (fork/exec, threading, event-driven) check out Dan Kegel’s c10k page (a little old, but a great reference).
In addition to switching web servers, we’re also planning on trying out FastCGI, which is an extension to regular CGI. Instead of forking a new process everytime a request is made, FastCGI optimizes by reusing the same process — this streamlines communication to the server.
In regular CGI, once the CGI finishes, the process exits and the web server returns any pending data to the client. FastCGI on the other hand, doesn’t exit once a request is processed; it sticks around and waits for the next request. This way, the web application lives indefinitely, and doesn’t have the overhead of starting and ending a request — the context of the application is still there and that allows for all sorts of other optimizations. Pretty cool, huh?
We’ve actually already deployed LightTPD on one of our servers, and so far, the results are promising. But as always, we’d love to hear if any of you have tried LightTPD or FastCGI, and have any recommendations. Our goal is to make meebo a great user experience, which means tidying up the backend as well as fulfilling feature requests on the frontend.
cheers!
sandy
September 23rd, 2005 at 6:12 am
Hi there!!!
I like very much this site and yours IM system.
I linked you in my blog: http://www.rivers.eti.br/
Eli
September 23rd, 2005 at 8:55 am
cool, thanks
September 25th, 2005 at 5:41 pm
Hey, I think it’s cool to that you have taken the time to show the world a little bit about your architecture. The openness is refresshing. Most people, in the industry tend to hold onto our secrets.
Now I’m going to ramble:
Isn’t it interesting how single threaded applications that use event based networking tend to out perform forking and multi-threaded servers consistently?
Lighttpd is is a good solution, no doubt. Various groups go different ways on this. At yahoo, they tended to extend the kernel in order to make the context switching negligable. They also reduced functionality in order to reduce context swithing. I still would pick lighttpd over that since the kernel hacking and Apache modifications are too large for a small team.
Overall, it’s a nice off the shelf solution wrather than rolling your own.
The price for the speed is discipline, though. You will definitely need to make sure you understand how to use your resources properly. As you run under FastCGI, any memory-leaks / file-descriptor leaks, etc will end up taking you down. In the Apache world, this isn’t a problem, since your process dies. I recommend having multiple pools of FastCGI servers with limited run-times.
Also, keep an eye on logging. As you grow in size (which you will
, the hits for logging may become significant consumers of cpu + disk i/o.
March 23rd, 2006 at 10:51 pm
mazda sportscar club of washington
mazda sportscar club of washington
April 1st, 2006 at 4:34 am
IRS
http://www.irs-problems.com/
April 1st, 2006 at 8:11 am
Vioxx Side Effects
http://www.sideeffectsofvioxx.com/
April 2nd, 2006 at 4:15 am
VOIP
http://www.linuxsummit.org/
April 3rd, 2006 at 8:45 am
Distance Education
http://www.distanceeducationonline.org/
April 20th, 2007 at 4:31 am
mz kitty
mz kitty source
June 18th, 2007 at 6:28 pm
Isn’t it interesting how single threaded applications that use event based networking tend to out perform forking and multi-threaded servers consistently
July 15th, 2008 at 2:02 pm
[...] still using lighttpd and mod_meebo. And up until a few weeks ago we were still using the Gaim 1.5.0 codebase to connect [...]
July 15th, 2008 at 5:11 pm
hola como estas chao
July 16th, 2008 at 8:57 am
I second Dru, I love this info. Please don’t stop posting this kind of stuff! I’m just learning Rails right now..what an amazing little tool!
Thanks again, keep it up!
July 16th, 2008 at 2:42 pm
Reinaldo.
No se si te llegara este mensaje, estoy tratando a travez de meebo.com poder conectarme en yahoo.
te pido, que tu, que eres ducho en esta materia trates de enviarme a mi correo la opcion de meebo.com para hacerte usuario de mi cuenta de correo y poder chatear por esat via.
El asunto de conectarme en Internet como te explique a travez de tarjetas de 6 cuc y hoteles y etc…. me es incosteable.
saludos a todos.
Marito
July 17th, 2008 at 9:30 am
I bet you will notice your bandwidth going up exponentially while your CPU utilization goes down by about 20%.
Oh and bugs will make you cry…
July 17th, 2008 at 7:28 pm
Like another comment said, it’s really great to read aobut some of meebo’s internals.
The world of servers and scalibility is not well understood, and fully of surprises.
I’ve long thought that threads are mis-understood. They have their place, but are not the only way to go.
Meebo is an intersting application, because it is essentially a dispatcher back end with an evolving ‘rich’ front end. I’ve been very impressed by the meebo team, and am an enthusiasic user. This is the right way to do IM, with no plugin.
It wouldnt take much imagination to extend the concept to other types of services, and it wouldnt be a surprise if the meebo folks are already headed that way.
Meebo rocks!
July 19th, 2008 at 10:13 pm
[...] to use Lighttpd due to some glowing reviews and reports that Wikipedia, Youtube and my favourite Meebo are using them. Well actually it was due to Apache1.3 giving me tons of core dumps error when paired [...]
February 6th, 2009 at 9:43 am
Thanks great post
April 7th, 2009 at 10:21 am
thanks
مواقع دردشة : شبكة فرسان المجلات مافيا المجلات : منتدى الحياة الزوجية : شات المها شات الود : كرسي الاعتراف : منتديات فرسان المجلات مافيا المجلات : مواقع جنسيه : الحب الرومانسية فرسان المجلات مافيا المجلات : موقع دردشة: شات سنوات الضياع : شات الحب منتديات دار العرب
June 27th, 2009 at 10:57 am
شات
September 27th, 2009 at 6:35 pm
yes
great
but can find that
December 8th, 2009 at 4:14 am
yes
great
but can find that