SlideShare a Scribd company logo
Node.js in
Production
-
|
Seattle Node.js
May 8th, 2013
Ryan Roemer @ryan_roemer
Overview
Production!
Well, what our production looks like.
Five Node.js-related things we've
learned.
Some additional resources.
What is
"Production"?
Curiosity Media
Brought to you
by...
A team of three engineers
Who are full-time developers
Running everything in the cloud
With minimal time available for ops
SpanishDict.com
Demo
A Spanish-English
Dictionary
is the world’s
largest Spanish-English dictionary,
translation, and language learning
website. We develop and provide
reliable, accurate, easy-to-use
resources for learning Spanish.
SpanishDict.com
Our visitors
A into our data and usage:
6,000,000 Unique visitors every month
1,000,000 Translations
100,000 Questions and answers
25,000 Flashcards
5,000 Video pronunciations
90 Lessons
quick glance
Our Services
Node Other
API server Web site
Auto-suggest server Data mining
Translation server Operations
Text-to-speech server
Our Traffic
Very low latency for our db-backed
services.
Service Reqs/min
API server 35K / min
Auto-suggest server 15K / min
Translation server 2.5K / min
Text-to-speech server 400 / min
Five Node.js
production tips
1. Know when to Node
2. Keep up with Node
3. Design for failure
4. Isolate services
5. Analyze everything
1. Know when to
Node
Should you use Node.js?
Yes
Small apps (think JSON APIs)
"Glue" for services or data
Proxies
Concurrent data
Use the module
Lots of connections
stream
Maybe not
Computation
Legacy applications
"Solved" problems (fuzzy search, NLP,
etc.)
2. Keep up with
Node
Bleeding edge, lots of breakage.
Stay up to date with Node.js and libraries.
Infrastructure
Node.js
deployments
PAAS: Often, the easier way.
, , , etc.
IAAS: Expect some DIY
Build custom Node.js versions
Install modules from scratch
Get ready to roll back
Joyent Heroku Nodejitsu
3. Design for failure
Fail and recover at multiple levels.
App-level
Errors
Handle: uncaughtException
Listen: foo.on("error")
Use the module
Workers: die early on errors
Master: monitor and kill workers
cluster
Server-level
Use or alternatives
Restart the Node.js master
monit
Service-level
Have lots of small apps
Stateless, fungible servers
Hot failover wherever possible
4. Isolate services
Separate resource and failure classes.
Resources
CPU/Load: Run out of this and it's over.
Also, memory, I/O, etc.
... and combinations thereof
Our pains
Node.js apps aren't necessarily good
neighbors.
Suggest (DB) and translate (http)
Backend (DB) and web site (CPU/load,
memory)
Read and write servers
Takeaways
Always preserve CPU
Monitor system stats for cross-pressure
5. Analyze
everything
How well are we addressing lessons 1-4?
Data drives problem discovery and action.
Log, Monitor, Mine
Things to look for
Some metrics that affect Node.js apps
Type Metrics Uses
System CPU, I/O, memory,
network
Alert
Server Throughput, latency Alert,
Report
Traffic Peaks (weeks,
months)
Report
Errors Quantitative,
qualitative
Alert,
Report
Decisions, Goals
Identify
Resource pressure
Bugs
Decide
Scale up, scale down?
Separate?
Demo
Recap
1. Know when to Node
2. Keep up with Node
3. Design for failure
4. Isolate services
5. Analyze everything
Further Reading
by
by
by
Production Node.js Secrets
@dshaw
Node.js in Production @felixge
Zero to Node @williamjohnbert
Thanks!
|Ryan Roemer @ryan_roemer
@SeattleNode

More Related Content

PDF
CascadiaJS 2014 - Making JavaScript Tests Fast, Easy & Friendly
PDF
Webconf nodejs-production-architecture
PDF
Horizontally Scaling Node.js and WebSockets
PDF
[Js hcm] Deploying node.js with Forever.js and nginx
PPTX
WordPress.org & Optimizing Security for your WordPress sites
PDF
Introduction to Node.js
PPTX
NodeJS and what is actually does
KEY
A Very Biased Comparison of MVC Libraries
CascadiaJS 2014 - Making JavaScript Tests Fast, Easy & Friendly
Webconf nodejs-production-architecture
Horizontally Scaling Node.js and WebSockets
[Js hcm] Deploying node.js with Forever.js and nginx
WordPress.org & Optimizing Security for your WordPress sites
Introduction to Node.js
NodeJS and what is actually does
A Very Biased Comparison of MVC Libraries

What's hot (20)

PPTX
WordPress Zurich Meetup #5: mobilesport.ch insights
PDF
The Secret Sauce in the Open Cloud
PDF
Understand How Node.js and Core Features Works
PDF
Server-Side JavaScript with Nashorn
PDF
5 Quick JavaScript Performance Improvement Tips
PDF
Ops is dead. long live ops.
PDF
Nodejs
PDF
08 Workflow e strumenti web
PDF
Node intro
PPTX
Postmortem of a uwp xaml application development
PDF
Cassandra Development Nirvana
PDF
Golang @ Tokopedia
PDF
Real world Webapp
PPT
High performance java script why everything youve been taught is wrong
PDF
Minimum Viable Docker: our journey towards orchestration
PPTX
Node.Js: Basics Concepts and Introduction
PPTX
Breaking the eggshell: From .NET to Node.js
PDF
NodeSummit - MEAN Stack
PDF
Optimising PyroCMS for speed and performance boosts
PDF
TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN
WordPress Zurich Meetup #5: mobilesport.ch insights
The Secret Sauce in the Open Cloud
Understand How Node.js and Core Features Works
Server-Side JavaScript with Nashorn
5 Quick JavaScript Performance Improvement Tips
Ops is dead. long live ops.
Nodejs
08 Workflow e strumenti web
Node intro
Postmortem of a uwp xaml application development
Cassandra Development Nirvana
Golang @ Tokopedia
Real world Webapp
High performance java script why everything youve been taught is wrong
Minimum Viable Docker: our journey towards orchestration
Node.Js: Basics Concepts and Introduction
Breaking the eggshell: From .NET to Node.js
NodeSummit - MEAN Stack
Optimising PyroCMS for speed and performance boosts
TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN
Ad

Viewers also liked (7)

PDF
Learn Frontend Testing
PDF
Fail the Right Way - Node.js in Production
PDF
From NASA to Startups to Big Commerce
PDF
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
PDF
Support and Initiate a DevOps Transformation
PDF
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
PDF
DevOps tools for everyone - Vagrant, Puppet and Webmin
Learn Frontend Testing
Fail the Right Way - Node.js in Production
From NASA to Startups to Big Commerce
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
Support and Initiate a DevOps Transformation
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
DevOps tools for everyone - Vagrant, Puppet and Webmin
Ad

Similar to Node.js in Production (20)

PDF
Node in Real Time - The Beginning
PPTX
Intro to node and non blocking io
PPTX
An overview of node.js
KEY
20120514 nodejsdublin
PDF
NodeConf OneShot Budapest — Production Ready Node.js by Nuno Job
PPTX
Nodejs web service for starters
PDF
8 tips for mastering node.js
PDF
8 tips for mastering node.js
PDF
12 Reasons to Choose NodeJS for Product Development.pdf
PDF
The Happy Path: Migration Strategies for Node.js
PPSX
Node.js In The Enterprise - A Primer
PPTX
Definitive Guide to Powerful Nodejs Development.pptx
PDF
Node.js.pdf
ODP
Introduce about Nodejs - duyetdev.com
PDF
Philly Tech Week Introduction to NodeJS
PPT
Introduction to node.js aka NodeJS
PDF
Event driven programming -- Node.JS
PDF
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
PDF
The Enterprise Case for Node.js
PDF
What is Node.js_ Where, When & How To Use It.pdf
Node in Real Time - The Beginning
Intro to node and non blocking io
An overview of node.js
20120514 nodejsdublin
NodeConf OneShot Budapest — Production Ready Node.js by Nuno Job
Nodejs web service for starters
8 tips for mastering node.js
8 tips for mastering node.js
12 Reasons to Choose NodeJS for Product Development.pdf
The Happy Path: Migration Strategies for Node.js
Node.js In The Enterprise - A Primer
Definitive Guide to Powerful Nodejs Development.pptx
Node.js.pdf
Introduce about Nodejs - duyetdev.com
Philly Tech Week Introduction to NodeJS
Introduction to node.js aka NodeJS
Event driven programming -- Node.JS
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
The Enterprise Case for Node.js
What is Node.js_ Where, When & How To Use It.pdf

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Building Integrated photovoltaic BIPV_UPV.pdf
Spectroscopy.pptx food analysis technology
MIND Revenue Release Quarter 2 2025 Press Release
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...

Node.js in Production