Guest Blog By Shubhra Kar, StrongLoop
"On the ninth day of APM 9.7, the CA Team gave to me… Node.js Monitoring "
APIs are driving the new frontedge – inclusive of mobile, tablets, wearables, web browsers, sensors, et al by providing rich backend data access in a flexible interface. These APIs are being increasingly generated using API frameworks, which act as “super glue” tying together the endpoints of disparate enterprise systems and data sources, and then exposing them in a uniform API to all clients.
StrongLoop is the biggest contributor to Node.js core and maintains the widely used API and Web frameworks like Express.js and Loopback.io in addition to 100 opensource projects. StrongLoop Arc is the industry’s first platform and graphical tool for developing and deploying APIs in Node.js that covers the entire API lifecycle. It enables developers to do everything from designing APIs, integrating them with new and legacy data and services, building and deploying apps, plus leveraging DevOps features like performance monitoring and profiling – all in a single UI.
CA APM team partnered with StrongLoop to deliver CA APM Collector for Node.js that provides an E.P.I.C. solution for enterprises running Node.js applications to identify and resolve Node.js performance issues and integrate the application performance metrics into CA APM for intelligent analytics, alerting and visibility on a single dashboard.
StrongLoop Node.js monitoring Agent is deployed to auto instrument the Node.js application generating periodic metrics. These metrics are posted to the REST interface of the CA APM 9.7 EPAgent, to be processed and forwarded for integration into CA APM.
StrongLoop is also a CA Technologies Partner.
The CA APM Collector for Node.js applications leverages recently announced update to the SDK known as EPAgent (EPA) to support RESTful API . As you may know, the CA APM EPA is a stand-alone Java application with a wide range of features for collecting data to send to the CA APM Enterprise Manager. EPA was designed so that customers could, as easily as possible, integrate any data into CA APM – even information about the state of the garage door, lego robots, etc. EPA was originally designed for customers to register script “plugins”, either in “stateful” (e.g. log reading) or “stateless” (e.g. CPU or OS stats.)
Node.js Monitoring Metrics
There are many things that can impact the performance of Node.js application and they should be monitored to minimize any potential downtime. Degraded performance in Node.js is typically a function of slow or blocked Eventloops, slow API endpoints like Redis, Memcached, SQL servers or 3rd Party API calls.
Here are some of the key metrics monitored via CA APM Node.js Collector to ensure optimal Node.js application performance:
Node applications are event-driven on the server. EventLoop is the same to Node.js as threads are to a JVM or a CLR. They are the postmaster mechanism doing orchestration of asynchronous requests and responses. The event loop gives Node the capability to handle highly concurrent requests while still running “single-threaded”. The event loop delegates processing to the operating system via POSIX interface while still handling new request events and callbacks.
Event loops are usually extremely fast, however even the smallest amount of latency or degradation in the event loop response time can cause the transaction response times to jump significantly. Slow running and blocked event loops are the most critical metrics to watch out for !
Cross Tier Average Response Times
Node.js typically acts as an API glue between disparate frontends and highly distributed and disparate backends. Monitor the response times of the entire stack including http, caching, database tiers etc.
V8 Garbage Collection, CPU and Memory
Node.js runs on Google’s V8 Chrome engine on the server. Efficient memory management and garbage collection are key to high performing applications. StrongLoop’s monitoring provides visibility into to total allocated memory heap, the memory currently in use by the application and the frequency of garbage collection. These metrics help identify memory management bottlenecks and possible memory leaks. Use these metrics on historical timescales (one to 24 hours) to detect patterns like slow or abrupt memory leaks in the system. Such leaks will cause the application to crash and report out of memory conditions.
Concurrency and Load
Concurrency is a key indicator of the incoming queue of requests in progress or yet to be processed by the application. When there are bottlenecks in the application, requests will back up, resulting in higher than normal concurrency on the application.
Join me on CA APM community webcast on January 15th to learn more about Node.js monitoring.
The 12 Days of APM Blog Series
Nine Node.js Monitoring (12/16)
Eight APM PHP Monitoring (12/15)
Seven CA UIM Integration (12/14)
Six MongoDB Monitoring (12/13)
Five Rich Email Notifications with Contextual Data (12/12)
Four Smart Instrumentation (12/11)
Three Mobile App Analytics (12/10)
Two APM Command Center (12/9)
and an E.P.I.C APM Strategy (12/8)