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: 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.


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:

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

Be Sociable, Share!

7 Responses to Node.js, Unix based OS and MongoDB (NUM) are the new LAMP

  1. asenchi says:


  2. Adi R says:

    I’ve been thinking the same thing recently, and also debating between Redis and MongoDB for store engine.

    Mongo is more natural to this setup as it’s JavaScript friendly, but I haven’t tried integrating the two.

    Is there a good simple way to have Node.js integrated with MongoDB?

  3. Swish says:

    First see video:

    While I agree with you that Node + Mongo is gaining popularity, it will remain just one tool in the toolbox. There are far too many jobs that are well suited to a traditional RDMS like MySQL for LAMP to be replaced by NUM in the near future. If Node has some good bindings for MySQL or Postgres, etc than we may see more implementations of Node over PHP + Apache/Lightty/Nginx, but I don’t think the LAMP stack is going anywhere.

  4. johans says:

    Late to read this article:

    @Adi R: Checkout Mongoose – it is Node ORM for MongoDB:

  5. David Herron says:

    It’s not a terribly fair comparison to draw between Node.js and Apache+PHP. Sure Node has HTTP server support and you have a nice programming language to write applications with, etc. BUT Apache includes the full set of stuff for normal web application HTTP protocol behavior. Create an HTTP Server object in Node and all you have is the HTTP protocol, no cookies, nor many other things. Yeah you can implement it all because you’re in a programming language. But the advantage Apache provides is to have the normal stuff already in place. What’s needed is to wrap Node within a stack of stuff that implements the usual stuff. Connect+Express goes a long way toward that. But what about reliably running a real server in production mode? Cluster? Managed by daemontools? Or…?

  6. Julian says:

    Inspired by your post, i’ve made a Windows LAMP-like of Nodejs, which i called it NWM:

    Thanks for this :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>