Monitor Your Scaled Node.js App With Nodefly

OpenShift Partner Nodefly Logo

NodeFly joined forces with community partner OpenShift this past February with the goal of combining our Node monitoring solution with OpenShift’s PaaS. We felt that the partnership would provide a fantastic opportunity for developers to take advantage of Node.js cloud options via OpenShift and real-time performance awareness via the NodeFly dashboard.

One of the things we like about OpenShift is its gears technology. A gear, as described in OpenShift’s FAQ, is a container with a set of resources that allows users to run their applications. OpenShift runs and distributes gears on each virtual machine as needed, based on your application’s requirements. Now users can use the NodeFly dashboard to monitor real-time load over each gear that your product is using and fine-tune based on what you see.

This new ability was the result of some recent architectural changes, so the NodeFly team wanted to see this in action. And what better way to do that, we figured, than to create a test app and try it out?

The setup process on OpenShift is straightforward. You can go through the NodeFly on OpenShift Quickstart page to have a lot of the set up details completed for you automatically. Or, if you want more control, you can use command line. Either way, we recommend that you set your app as scalable at the start, as your app will not scale if you set it otherwise.

You can see OpenShift’s Management Console below, which allowed us to see how our set-up looks. It shows the status of our app, how many gears we are utilizing and how much storage space is taken. We can also add cartridges (a configuration template or script required to add a feature to OpenShift) and refresh our set-up from here.

OpenShift Console Screenshot

We added our test application, included Cron and MongoDB and proceeded to deploy and observe. We had nothing too extreme in mind – generating enough concurrent requests to kick another gear into action. Basically, it meant going past the connections allocated for one gear so that a second would be required. We simply set up our server to make requests to itself, generating random traffic against itself to simulate normal traffic.

When the application needed to scale upward and put another gear into use, the NodeFly dashboard treats the gear like any other server. That means you can use the drop-down menu on the NodeFly agent to choose which gear you want to observe. Then you can deep-dive in either gear to see what is impacting your app and plan accordingly. Or just take advantage of the profiling so you are aware. Of course, when the gear is no longer required, it would be scaled back.

OpenShift Gears monitored in Nodefly screenshot

Being able to see multiple gears means increasing the data that is visible on the NodeFly dashboard. And that means increasing awareness of what your product is doing. Simply use the NodeFly dropdown list to monitor the individual gears and see their activity, and tune your app accordingly. So, you have the worry of scaling taken care of by OpenShift, while having increased visibility of current load via the drop down. We think that is a win-win for your product development.

More from this author