AppNeta: Taking Node.js from Real-Time to the Big Time

Up to this point in time, cloud-base Application Performance Management (APM) vendor AppNeta has focused on the “big five” application development environments: Java, .NET, php, Python, and Ruby. Recently they added Node.js to the list. As a result, their TraceView product can now monitor well over 90% of the modern code in production today.

AppNetaHowever, there is more to the addition of Node.js to this list than simply rounding out the monitoring capabilities of TraceView. In fact, Node.js plays an important part of today’s real-time digital world. To fully understand the importance of monitoring Node.js, therefore, we must place this tool into context.

Real-Time Behavior the Modern Way

Node.js is a JavaScript-based, cross-platform, open source runtime environment for server-side and networking applications. Ryan Dahl of Joyent created Node.js to implement web sites with asynchronous, event-driven input/output (I/O) in order to create high-performance, real-time behavior without running into the limitations of other web technologies.

Traditional approaches to building web servers require each connection request to spawn a new thread on the server, which consumes memory resources and thus limits scalability. However, Node.js typically runs on a single thread using non-blocking I/O calls – an ingenious approach to scaling up the number of concurrent connections a web server can handle.

Furthermore, Node.js doesn’t even require a separate web server (that is, a separate HTTP process). Instead, the Node.js runtime can itself respond to connection requests by registering itself with the underlying operating system and then requesting a callback from the operating system for each request. However, instead of launching a thread or operating system process for each request, it uses a simple event loop for large numbers of concurrent requests. The server enters this event loop at the end of the callback definition, and continues to run the loop as long as callbacks remain.

The reason that callback-centric event loops are important is because they represent a lightweight, cloud-friendly approach to scaling HTTP-based interactions – whether such interactions are user web requests or increasingly common RESTful API calls. In fact, HTTP and JavaScript are a well-matched pair, and with the addition of asynchronous callbacks running in single-threaded event loops, this potent combination is driving high performance and real-time applications both on and off the web.

A Modern Management Challenge

Node.js’s modern approach to building scalable applications doesn’t mean that such applications don’t run into problems, however. Queries may still be too slow, JavaScript code paths may perform poorly for various reasons, and Node.js-based services may have unexpected or poorly architected dependencies that result in poor performance.

appneta screenshotAppNeta TraceView Showing Four Calls to Five Layers, Including Node.js (Source: AppNeta)

Traditional management tools, however, are poorly suited to identify and address such issues, as they may be expecting a traditional web server or a multi-threaded environment. Therefore, it is essential for operations teams to use a tool like AppNeta TraceView to monitor Node.js-based applications, as AppNeta has built Node.js support directly into their tool.

In fact, TraceView’s Node.js instrumentation doesn’t require any code modification, as it automatically inserts essential modules into the Node.js environment. From there TraceView gathers detailed performance information about data queries on NoSQL databases like MongoDB and Redis as well as all outgoing HTTP requests.

The Intellyx Take

Server-side JavaScript has been with us for years – in fact, I worked with it on the Netscape Enterprise Server back in 1997 – but Node.js takes the technology to a new level. Not only is asynchronous behavior now the default, but Node.js extends the role of JavaScript beyond web pages to HTTP interactions in any tier.

As a result, Node.js plays an important role in today’s next-generation Service-Oriented Architecture (SOA). Instead of the heavyweight, platform-centric SOAP Web Services of the last decade, today’s services are lightweight, RESTful, and more modularized and coherent than before – a pattern many people are calling microservices.

An important SOA best practice is to write the underlying code in whatever language makes sense for the desired capability of the service, as the contracted API abstracts the code from consumers of such services. As a result, Node.js is often the language of choice for building microservices, due to its HTTP-centricity and the scalability benefits outlined above.

For those organizations who are building microservices with Node.js, a tool like AppNeta TraceView is now a must-have, as services must comply with their contracts – a task that has always fallen to management technology since the early days of SOA. Don’t use a last-decade management tool for modern web and next-gen SOA services – use the right tool for the job.

AppNeta is an Intellyx client. Intellyx retains full editorial control over the content of this article.

SHARE THIS:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.