KEMBAR78
Connect js nodejs_devops_shubhra | PPTX
Triage, Diagnose & Scale Node.js 
Shubhra Kar | Director – Products 
twitter:@shubhrakar mail:skar@strongloop.com
Why am I here…or rather who sent me here ?
Node Core 
Bert 
Belder 
Ben 
Noordhuis 
These guys sent me ! 
LoopBack/Express Core 
Raymond 
Feng 
Ritchie 
Martori 
Sam 
Roberts 
Miroslav 
Bajtos 
Ryan 
Graham
To do what ? 
To give you a fresh pair of gloves 
Pack a punch Nodies !
Express new website & docs 
5
What are we trying to solve 
Let’s touch up our 
SOA for 
Mobile…and bring 
Glass @ work 
Architect Developer
So what’s the touchiness around Node 
I recommend 
Node.js for our 
API strategy 
I heard Node is nerdy !...u 
sure our developers know 
what’s cooking ? 
Architect The Boss
Node.js apps actually have a life cycle 
8 
Reliable API Solutions powered by Node.js 
Compose 
Deploy / Scale 
Monitor 
Secure / Manage 
API Studio Controller StrongOps API Gateway 
Development Production
Let’s start by debugging 
• Chrome debugger 
• Debug Remotely on 
Production 
• Breakpoints & 
uncaught exceptions 
• Source Maps 
• Unit test integration 
• Display/edit variables 
• Pre-loaded breaks 
Known as Node-Inspector / StrongLoop-Debug
Can Errors be stitched into a trace and recovered ? 
Enter StrongLoop / Zones
How to diagnose CPU hotspots upto line of code ? 
Enter StrongLoop / Node Profiler 
slc runctl cpu-start/stop PID
Can I visually see my hotspots ?
How about a fancy chart for my boss ? 
Call Stack 
Path and 
function 
CPU Cycle 
times
Does Node have memory leaks ? 
StrongLoop / HeapSnapshots 
slc runctl heap-snapshot PID
Another fancy chart please
We are getting there… 
See we have 
great Dev 
Tools 
Yeah…But don’t wake me 
3:00 a.m. in the 
night….Show me its 
Production ready 
Architect The Boss
Ok…here is 24x7 monitoring
On-Premises / 3rd Party monitoring ? 
18 
• Graphite 
• Splunk 
• Datadog 
• Introscope 
• Others
And On-Demand Dynamic Instrumentation 
Monkey 
Patching 
Agent App 
Dynamic 
Instrument 
Agent App 
• Live Edit 
• Line Level 
Instrumentation 
• Any package, any 
framework, any code 
• Custom logic 
• Counters, Gauges and 
Timers 
• HA rollback
Almost there … 
Look I got 
monitoring 
Good…but before I promote 
you, show me some scale 
Architect The Boss
Vertical and pseudo-horizontal scaling - Controller 
CPU Core 1 
Worker 
1 
CPU Core 2 
Worker 
2 
CPU Core 2 Worker 
n 
Master 
Cluster-Store / Redis 
Memcache (State Mgmt.) 
• SSL Termination 
• Load Balancing 
• Routing 
Databases 
Services 
(SOAP/REST) 
Nginx / 
HAProxy 
• Bare Metal 
• Virtual Machine 
Controller 
Controller 
Controller 
Controller 
Agent 
Agent 
Agent 
Agent
Distributed scaling and deployment - Mesh
Log Aggregation - Controller 
CPU Core 1 
Worker 
1 
CPU Core 2 
Worker 
2 
CPU Core 2 Worker 
n 
Master 
Splunk Server 
Controller 
Controller 
Controller 
Controller 
Aggregated 
Log 
Worker 1 
Log 
Worker 2 
Log 
Worker n 
Log 
System Log 
Aggregated 
Splunk Universal 
Forwarder 
API Events and 
Metrics
That’s how we win. 
hehe…I am a Node Hipster now ! 
The Boss
Nodies are not just silicon valley hipsters ! 
And most recently…. 
#1 Retailer
JUST WIN, 
BABY! 
First there was Node 
Thank you!

Connect js nodejs_devops_shubhra

  • 1.
    Triage, Diagnose &Scale Node.js Shubhra Kar | Director – Products twitter:@shubhrakar mail:skar@strongloop.com
  • 2.
    Why am Ihere…or rather who sent me here ?
  • 3.
    Node Core Bert Belder Ben Noordhuis These guys sent me ! LoopBack/Express Core Raymond Feng Ritchie Martori Sam Roberts Miroslav Bajtos Ryan Graham
  • 4.
    To do what? To give you a fresh pair of gloves Pack a punch Nodies !
  • 5.
  • 6.
    What are wetrying to solve Let’s touch up our SOA for Mobile…and bring Glass @ work Architect Developer
  • 7.
    So what’s thetouchiness around Node I recommend Node.js for our API strategy I heard Node is nerdy !...u sure our developers know what’s cooking ? Architect The Boss
  • 8.
    Node.js apps actuallyhave a life cycle 8 Reliable API Solutions powered by Node.js Compose Deploy / Scale Monitor Secure / Manage API Studio Controller StrongOps API Gateway Development Production
  • 9.
    Let’s start bydebugging • Chrome debugger • Debug Remotely on Production • Breakpoints & uncaught exceptions • Source Maps • Unit test integration • Display/edit variables • Pre-loaded breaks Known as Node-Inspector / StrongLoop-Debug
  • 10.
    Can Errors bestitched into a trace and recovered ? Enter StrongLoop / Zones
  • 11.
    How to diagnoseCPU hotspots upto line of code ? Enter StrongLoop / Node Profiler slc runctl cpu-start/stop PID
  • 12.
    Can I visuallysee my hotspots ?
  • 13.
    How about afancy chart for my boss ? Call Stack Path and function CPU Cycle times
  • 14.
    Does Node havememory leaks ? StrongLoop / HeapSnapshots slc runctl heap-snapshot PID
  • 15.
  • 16.
    We are gettingthere… See we have great Dev Tools Yeah…But don’t wake me 3:00 a.m. in the night….Show me its Production ready Architect The Boss
  • 17.
  • 18.
    On-Premises / 3rdParty monitoring ? 18 • Graphite • Splunk • Datadog • Introscope • Others
  • 19.
    And On-Demand DynamicInstrumentation Monkey Patching Agent App Dynamic Instrument Agent App • Live Edit • Line Level Instrumentation • Any package, any framework, any code • Custom logic • Counters, Gauges and Timers • HA rollback
  • 20.
    Almost there … Look I got monitoring Good…but before I promote you, show me some scale Architect The Boss
  • 21.
    Vertical and pseudo-horizontalscaling - Controller CPU Core 1 Worker 1 CPU Core 2 Worker 2 CPU Core 2 Worker n Master Cluster-Store / Redis Memcache (State Mgmt.) • SSL Termination • Load Balancing • Routing Databases Services (SOAP/REST) Nginx / HAProxy • Bare Metal • Virtual Machine Controller Controller Controller Controller Agent Agent Agent Agent
  • 22.
    Distributed scaling anddeployment - Mesh
  • 23.
    Log Aggregation -Controller CPU Core 1 Worker 1 CPU Core 2 Worker 2 CPU Core 2 Worker n Master Splunk Server Controller Controller Controller Controller Aggregated Log Worker 1 Log Worker 2 Log Worker n Log System Log Aggregated Splunk Universal Forwarder API Events and Metrics
  • 24.
    That’s how wewin. hehe…I am a Node Hipster now ! The Boss
  • 25.
    Nodies are notjust silicon valley hipsters ! And most recently…. #1 Retailer
  • 26.
    JUST WIN, BABY! First there was Node Thank you!