Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Understanding Heap Usage in Node.js Applications With N|Solid

DZone's Guide to

Understanding Heap Usage in Node.js Applications With N|Solid

In this video tutorial, we follow along as a Node.js expert shows us how to boost our web app's performance using heap snapshots.

· Web Dev Zone
Free Resource

Get deep insight into Node.js applications with real-time metrics, CPU profiling, and heap snapshots with N|Solid from NodeSource. Learn more.

Heap snapshots are extremely helpful for debugging memory-based issues in Node.js applications quickly and effectively.

A heap snapshot is just what it sounds like - a static snapshot of memory usage details at a moment in time - and it provides a glimpse at the heap usage of V8, the JavaScript runtime that powers Node.js. By looking at these snapshots, you can begin to understand where and how memory is being used.

Because each snapshot shows you a single historical state, heap snapshots are most useful when you compare two or more of them side by side. It is helpful to compare a snapshot that lies outside the bounds of expected heap usage (when your app is misbehaving) and another snapshot showing heap usage within the expected parameters. By looking for differences between the two snapshots, you can really dig in and find the source of memory usage issues.

We recently published a video on how to understand heap snapshots and automatically trigger them in your production Node.js applications, under real-world conditions, with N|Solid. Follow along with Joe Doyle:

One Last Thing

If you've got any questions about Node.js and memory, performance, or optimization, feel free to reach out to the team on Twitter at @NodeSource - we're always interested in helping the Node.js ecosystem become more secure and reliable.

If you'd like some hands-on guidance around Node.js and improving application performance, you should take a look at our performance consulting and Node.js training - we'll be able to help make your Node.js apps performant, and enable you and your team to make your apps fast in the long-term.

Node.js application metrics sent directly to any statsd-compliant system. Get N|Solid

Topics:
web dev ,node.js ,node.js performance ,heap

Published at DZone with permission of Tierney Cyren, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}