dont let just node.js take the blame @nodeinteractive austin

Post on 18-Feb-2017

189 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Don’t let just Node.js take the Blame

Daniel Khan, Dynatrace

@dkhan

@dkhan

Node.js is what the Company Outlaws

use to finally introduce change

Node.js is what the Company Hipsters threw in

just to break everything

Proactive Defense

Node.js is a C++ program controlled by V8 JavaScript

Hunting Memory Problems

process.memoryUsage(){ rss: 4935680, heapTotal: 1826816, heapUsed: 650472 }

How to build a Memory Leak

theThing

someMethod()

longStr

unused()

originalThing

Closure Context

Reference

Root

http://bit.ly/1PvijIy

var snap = profiler.takeSnapshot();snap.serialize();

v8-profiler

Delta

Hunting CPU Problems

The Node.js Event Loop!

calculateFibonacci();

http://bit.ly/1jQMbBR

profiler.startProfiling(id); profiler.stopProfiling(id);

v8-profiler

NODE_ENV=productionNODE_ENV=development

Blog: http://bit.ly/1flz0Xm

NODE_ENV=development NODE_ENV=production

get(‘/routeA’, function(){})

get(‘/routeB’, function(){})

get(‘/routeC’, function(){})

get(‘/routeD’, function(){})

get(‘/routeE’, function(){})

get(‘/routeA’, function(){})

get(‘/routeX’, function(){})

get(‘/^(route|router)\/(.+)’, function(){})

HTTP GET /routeX

get(‘/routeA’, function(){})

get(‘/routeX’, function(){})

O(n)

Finding the route

Tools for Node.js Monitoring

1980 20001995 2005 2010 2015

Stakeholders

Backpressure

1000 RPS

Node.js

10 RPS

Ancient Legacy Backend

Browser Webserver Node Java Oracle

We who cut mere stones must always be envisioning cathedrals.

—Quarry worker's creed

Meet Application Performance Monitoring

Transactional Tracing in Node.js

Complete Transaction CoverageBrowser / Native Mobile Java/

.NET

PerformanceWarehouse

PurePathCollector

DynatraceServer

DynatraceClient

SessionsStore

ExportedSession

OfflineSession Analysis

Web Server/ PHP/ Node.js

C++, VB, ADK

CICS

Mainframez/OS

MQ/ESB

Database

Dedi

cate

d M

onito

ring

and

Debu

ggin

g To

ols

Summary

Use Tracing Tools that follow your Transactions

@dkhan

Daniel Khandaniel.khan@dynatrace.com

top related