What is Nodejs ?

  • Server-side JavaScript environment
  • Run’s on google V8 JS engine + libraries

Why Nodejs ?

  • Never blocked on database/IO
  • Rapid development
  • Wealth of 3rd party packages(300,000+ on 11/6/16)
  • When you need high levels of concurrency but little dedicated CPU time

Great for Streaming or event-based real-time app

  • Web sockets(socket.io for chat apps)
  • Editing documents online

Node.js Books, Websites, Tutorials - Link

Web Apps (Windows)

In just a few steps you can build and deploy your Node.js app to Azure. I have blogged about it earlier at link

In case of Azure App services(Windows), Below are list of steps it follows

  1. As you can see in below screenshot, request hits one of the front-end server that navigates it to appropriate app instance(worker role).
  2. After reaching Worker Role, it would use IIS server
  3. IIS uses iisnode module to make named pipe connection with node.exe

Nodejs Request Azure App Services Windows

  • Deploy Sample Web APP Link
  • IISnode Configurration Link
  • Custom Deployment Script Link
  • Nodejs/NPM Versions Link
  • Debug Nodejs App Link
  • CPU Usage and Memory Leaks Link
  • Best Practices Link
  • Nodejs app performance tweaks Link
  • Enable Browser Cache Link
  • Installing Native Nodejs Modules Link

Web Apps (Linux)

Azure has recently announced Web Apps on Linux. You can quickly create an app following Link and setup continuous deployment to publish the app.

In case of Azure App services(Linux), Below are list of steps it follows

Nodejs Request Azure App Services Linux

  1. As you can see in above screenshot, request hits one of the front-end server that navigates it to appropriate app instance(worker role).
  2. Web Apps on Linux is built on top of Docker technology. So, you would be given two different containers(App and Kudu Container) per app sharing same storage volume.
  3. Request would navigate to App container which uses PM2 to manager node.exe processes.
  4. while Git deployment would utilize kudu container.