LAMP is the web stack that powers the majority of websites today. My argument is that we are in the beginning stages of a transition away from using Linux, Apache, MySQL and PHP (there other variants) towards utilizing Node.js, a Unix based operating system and MongoDB for hosting web applications. Here’s why:

Node.js scales better and can do more with a simpler interface than Apache and PHP

The combination of apache and php to serve web sites is a threaded system. When a request comes in to apache it spawns a new thread and php renders the page. During heavy load apache’s spawning of threads can actually be the bottleneck in the system if the database is really fast. Node uses a very different system, running under Google Chrome’s V8 javascript engine it runs an event based system on one thread. It has callbacks for just about everything and the thread never needs to wait for i/o to finish before moving on to something else. During high load node excels because of this asynchronous system where it doesn’t use nearly as much memory because it does not spawn threads. (A great talk on the difference: http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html) Another thing to keep in mind is websockets are starting to gain a backing and having many requests coming into apache over websockets is not just complicated but slow.

Unix based OS

While this will probably be linux both technologies work great on FreeBSD and Apple’s OSX. This is really nothing new because there are things like wamp that exist for the lamp stack on windows. I however, cringe when someone tells me they are developing anything other than a flash or windows application on windows.

MongoDB

The NoSQL trend is gaining huge traction these days because of its extreme performance advantages. As opposed to MySQL and its other sql friends MongoDB keeps as much in memory as possible while still keeping it usable. I make this point because Redis provides the speed of memory but without the tools you would find in an sql database. Some benchmarking that proves my point: http://jayant7k.blogspot.com/2009/08/document-oriented-data-stores.html

I see a NUM future on the web, with users running real time web applications that utilize websockets. They are sending at least a factor of ten more requests per second and the lamp stack’s days are most certainly numbered