don't let just node.js take the blame
TRANSCRIPT
![Page 1: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/1.jpg)
Hunting Performance Problems in Node.jsAPAC Tour 2016
Daniel Khan | @dkhan
![Page 3: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/3.jpg)
Node.js is what the Company Outlaws
use to finally introduce change
![Page 4: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/4.jpg)
![Page 5: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/5.jpg)
![Page 6: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/6.jpg)
![Page 7: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/7.jpg)
Node.js is what the Company Hipsters threw in
just to break everything
![Page 8: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/8.jpg)
![Page 9: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/9.jpg)
Proactive Defense
![Page 10: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/10.jpg)
![Page 11: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/11.jpg)
Node.js is a C++ program controlled by V8 JavaScript
![Page 12: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/12.jpg)
![Page 13: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/13.jpg)
![Page 14: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/14.jpg)
![Page 15: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/15.jpg)
Hunting Memory Problems
![Page 16: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/16.jpg)
![Page 17: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/17.jpg)
process.memoryUsage(){ rss: 4935680, heapTotal: 1826816, heapUsed: 650472 }
![Page 18: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/18.jpg)
![Page 19: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/19.jpg)
![Page 20: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/20.jpg)
![Page 21: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/21.jpg)
![Page 22: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/22.jpg)
![Page 23: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/23.jpg)
theThing
someMethod()
longStr
unused()
originalThing
Closure Context
Reference
Root
![Page 24: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/24.jpg)
![Page 25: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/25.jpg)
![Page 26: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/26.jpg)
![Page 27: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/27.jpg)
![Page 28: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/28.jpg)
http://bit.ly/1PvijIy
var snap = profiler.takeSnapshot();snap.serialize();
v8-profiler
![Page 29: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/29.jpg)
Delta
![Page 30: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/30.jpg)
Hunting CPUProblems
![Page 31: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/31.jpg)
![Page 32: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/32.jpg)
calculateFibonacci();
![Page 33: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/33.jpg)
http://bit.ly/1jQMbBR
profiler.startProfiling(id); profiler.stopProfiling(id);
v8-profiler
![Page 34: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/34.jpg)
![Page 35: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/35.jpg)
![Page 36: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/36.jpg)
![Page 37: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/37.jpg)
![Page 38: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/38.jpg)
![Page 39: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/39.jpg)
NODE_ENV=productionNODE_ENV=development
Blog: http://bit.ly/1flz0Xm
![Page 40: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/40.jpg)
![Page 41: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/41.jpg)
![Page 42: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/42.jpg)
![Page 43: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/43.jpg)
![Page 44: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/44.jpg)
![Page 45: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/45.jpg)
![Page 46: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/46.jpg)
Border Defense
![Page 47: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/47.jpg)
1980 20001995 2005 2010 2015
Stakeholders
![Page 48: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/48.jpg)
![Page 49: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/49.jpg)
“No man is an island”or … We need a holistic view.
![Page 50: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/50.jpg)
Browser Webserver Node Java Oracle
![Page 51: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/51.jpg)
Meet Application Performance Monitoring
![Page 52: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/52.jpg)
![Page 53: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/53.jpg)
![Page 54: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/54.jpg)
Node.js
![Page 55: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/55.jpg)
![Page 56: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/56.jpg)
![Page 57: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/57.jpg)
![Page 58: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/58.jpg)
![Page 59: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/59.jpg)
Transactional Tracing and Node.js
![Page 60: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/60.jpg)
![Page 61: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/61.jpg)
![Page 62: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/62.jpg)
![Page 63: Don't let just Node.js take the blame](https://reader036.vdocument.in/reader036/viewer/2022081604/58a790aa1a28ab5f6c8b53e9/html5/thumbnails/63.jpg)
Takeaways• Node.js introduces change• If something breaks within Node.js it’s most probably a memory leak or a CPU hog• Protect your boundaries by actively monitoring incoming and outgoing transactions• Use APM Solutions like Dynatrace or Ruxit to get a holistic view for all transactions passing
through all tiers of your stack• There is more to come when Node.js’ tracing capabilities mature