what is iisnode
iisnode is a native IIS module that allows hosting of node.js applications in IIS on Windows.
- Process management. The iisnode module takes care of lifetime management of node.exe processes making it simple to improve overall reliability. You don’t have to implement infrastructure to start, stop, and monitor the processes.
- Scalability on multi-core servers. Since node.exe is a single threaded process, it only scales to one CPU core. The iisnode module allows creation of multiple node.exe processes per application and load balances the HTTP traffic between them, therefore enabling full utilization of a server’s CPU capacity without requiring additional infrastructure code from an application developer.
- Auto-update. The iisnode module ensures that whenever the node.js application is updated (i.e. the script file has changed), the node.exe processes are recycled. Ongoing requests are allowed to gracefully finish execution using the old version of the application, while all new requests are dispatched to the new version of the app.
- Access to logs over HTTP. The iisnode module provides access the output of the node.exe process (e.g. generated by console.log calls) via HTTP. This facility is key in helping you debug node.js applications deployed to remote servers.
- Minimal changes to node.js application code. The iisnode module enables hosting of existing HTTP node.js applications with very minimal changes. Typically all that is required is to change the listed address of the HTTP server to one provided by the iisnode module via the process.env.PORT environment variable.
- Integrated management experience. The issnode module is fully integrated with IIS configuration system and uses the same tools and mechanism as other IIS components for configuration and maintenance.
- Other IIS benefits. Port sharing, security, URL rewriting, compression, caching, logging
- IIS 7.x with IIS Management Tools
- Latest node.exe Windows build from nodejs.org saved to %systemdrive%\node directory
- Visual Studio C++ Express (development only)
- IIS 7 header files from Windows SDK (development only)
For 32 bit Windows:
msbuild /p:Platform=Win32 src\iisnode\iisnode.sln
For 64 bit Windows:
msbuild /p:Platform=x64 src\iisnode\iisnode.sln
installing after build
installing from a download
- Download and unzip desired build
http://localhost/node (available after installation)
Which binary version do I need to download?
Please choose x86 flavors for installation on 32-bit Windows systems, and amd64 flavors for installation on 64-bit Windows systems.
Does iisnode block threads per request or connection
iisnode is completely async and does not block threads per request or connection. It does allocate small amounts of memory for active requests.
How do I report issues?
Please verify if your issue is already known by searching https://github.com/tjanczuk/iisnode/issues. If you don’t find it there, create a new issue report. Please include the following information with your bug report:
- Windows OS version and bitness (32/64)
- IIS version
- which version of iisnode you are using (changelist number if compiled, binary package name if downloaded)
- all interesting information from the IIS error page that displays (if any)
- all interesting information IIS logs into the Event Viewer (http://msdn.microsoft.com/en-us/library/ms524984(v=vs.90).aspx)
I am getting a 503 response when running samples
If you run into a 503 status code with IIS reporting error code 0x5 (ERROR_ACCESS_DENIED), make sure the identity of the application pool running the site that hosts your node.js application has read & execute rights to node.exe on disk. If you are using the default IIS configuration (DefaultAppPool running under ApplicationPoolIdentity), you can set appropriate ACLs on the node.exe by running:
icacls %systemdrive%\node\node.exe /grant IIS_IUSRS:rx