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)

PPTX
Computer software specialists wikki verma
PDF
Ibm webpshere
PPTX
Node.js: A Guided Tour
PDF
Best node js course
PPTX
Unit 1 Express J for mean stack and mern
ODP
PPTX
The Web on Windows
PPTX
Web performance
PPTX
Production debugging web applications
PDF
540slidesofnodejsbackendhopeitworkforu.pdf
PPTX
ConFoo 2017: Introduction to performance optimization of .NET web apps
PPTX
PHP Performance: Principles and tools
PDF
Documenting Your API
PDF
Introduction to node.js by Ran Mizrahi @ Reversim Summit
PDF
Apache Solr - An Experience Report
PPTX
Production Debugging War Stories
PDF
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
PPT
UnConference for Georgia Southern Computer Science March 31, 2015
PPT
Apache Con 2008 Top 10 Mistakes
Computer software specialists wikki verma
Ibm webpshere
Node.js: A Guided Tour
Best node js course
Unit 1 Express J for mean stack and mern
The Web on Windows
Web performance
Production debugging web applications
540slidesofnodejsbackendhopeitworkforu.pdf
ConFoo 2017: Introduction to performance optimization of .NET web apps
PHP Performance: Principles and tools
Documenting Your API
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Apache Solr - An Experience Report
Production Debugging War Stories
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
UnConference for Georgia Southern Computer Science March 31, 2015
Apache Con 2008 Top 10 Mistakes

Recently uploaded (20)

PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
The various Industrial Revolutions .pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Unlock new opportunities with location data.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Hybrid model detection and classification of lung cancer
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Hindi spoken digit analysis for native and non-native speakers
PPT
What is a Computer? Input Devices /output devices
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Getting Started with Data Integration: FME Form 101
1 - Historical Antecedents, Social Consideration.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
A comparative study of natural language inference in Swahili using monolingua...
The various Industrial Revolutions .pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Web Crawler for Trend Tracking Gen Z Insights.pptx
Unlock new opportunities with location data.pdf
sustainability-14-14877-v2.pddhzftheheeeee
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Developing a website for English-speaking practice to English as a foreign la...
Hybrid model detection and classification of lung cancer
A review of recent deep learning applications in wood surface defect identifi...
A novel scalable deep ensemble learning framework for big data classification...
Hindi spoken digit analysis for native and non-native speakers
What is a Computer? Input Devices /output devices
Assigned Numbers - 2025 - Bluetooth® Document
WOOl fibre morphology and structure.pdf for textiles
Getting Started with Data Integration: FME Form 101

Node.js in Production