Node.js Application Monitoring with the NodeFly Dashboard, Part One

“We think the best place to have your data is right in front of you,” we state on our homepage. “With our unified dashboard, you have a real-time visual representation of your Average Response time, Top Slowest Functions, CPU, Concurrent Connections/Throughput, Event Loop, and Memory/Heap data.”

NodeFly provides this data for users because think you should monitor your Node.js product from the start. But in addition to having access to the data, some of you are wondering the best way to make use of that real-time insight.

We want the NodeFly dashboard to provide an opportunity to deep dive into your overall performance and make your product run as efficiently as possible. While each chart breaks time down into intervals (5 minute intervals if you are viewing by the hour, 15 minutes if you are looking at three hours, and so on), you can zoom in to any graph for a closer look simply by highlighting a section of data with your mouse – and reset via the button that will appear in the top right corner. 

So, let’s take a look at each individual graph on our dashboard to review what you see.

Average Response Time by Tier

Average Response Time gives you a bird’s eye view of how your system is performing. You can keep an eye out for spikes or metrics trending upwards over time as you test your system. Each metric shows the average response time in the last minute for that part of your system (and overall for HTTP). You can see at a glance how each of your databases are performing, plus see outgoing HTTP requests (for example, Facebook, Twitter, other external API). These are shown as a stacked area so you can quickly determine which components are contributing to performance at any given point.

image

This graph presents data for HTTP, MySql and MongoDB. You can highlight or hide either of these as desired, allowing you to focus on them individually or in combinations.

The'http' line shows the average total time for any incoming HTTP request. The more complex your page is, the longer this total time might be.

When testing your product’s Average Response Time, you will see what is happening with your product, but you may not know why. There may be exceptions, or there may be spikes that will affect your product regularly. Knowing which it is requires a familiarity with your product and how changes or activity affects it. Test and analyze the individual transactions to see how they influence things. Which transactions caused an increase in response time? Which barely impacted response time? And which are critical to your product?

Top Functions

As the turtle icon suggests, the Top Functions will display all that is slow with your product. These are specific HTTP requests served or database calls that performed slower than others. You’ll use this to see exactly what an API is doing when it is behaving slowly.

image

You can hover over HTTP requests for details and you can drill down to see what percentage of the request was spent on each database query. You can also drill down for a detailed Path Map of which queries depended on which.

Knowing why your functions are slow is a significant part of the battle. Each top function includes a breakdown showing where your time is spent. By knowing where your servers’ resources are going, you can isolate and optimize the slowest parts of your application. 

image

CPU Usage

This graph shows you the time this process has spent user and system space.

You can highlight or hide user or system details.

You can use this chart to determine if your process is CPU intensive. If it is, you may want to consider scaling out so you can share this load on multiple CPU cores or even multiple servers. Node.js is single threaded so CPU intensive tasks can block the event loop and cause poor performance for your application.

image

Currently NodeFly monitors on a per-process basis but we will be pushing out some changes to help you see summary data for all the processes in your app. We will still give you the option to drill down to the process level stats.


In Part Two of this article, we will finish off our tour of the NodeFly Agent Dashboard graphs and give some tips on how to make the best use of each of them. In the meantime, check out our agent at http://www.nodefly.com to put what you have learned to use!