SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

The Secret Sauce in the Open Cloud
The Secret Sauce in the Open CloudThe Secret Sauce in the Open Cloud
The Secret Sauce in the Open Cloud
hugs
 
08 Workflow e strumenti web
08 Workflow e strumenti web08 Workflow e strumenti web
08 Workflow e strumenti web
Federico Russo
 

Mais procurados (20)

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

Destaque

Fail the Right Way - Node.js in Production
Fail the Right Way - Node.js in ProductionFail the Right Way - Node.js in Production
Fail the Right Way - Node.js in Production
Ryan Roemer
 
From NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceFrom NASA to Startups to Big Commerce
From NASA to Startups to Big Commerce
Daniel Greenfeld
 

Destaque (7)

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

Semelhante a Node.js in Production

540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
hamzadamani7
 
PHP Performance: Principles and tools
PHP Performance: Principles and toolsPHP Performance: Principles and tools
PHP Performance: Principles and tools
10n Software, LLC
 

Semelhante a Node.js in Production (20)

Computer software specialists wikki verma
Computer software specialists   wikki vermaComputer software specialists   wikki verma
Computer software specialists wikki verma
 
Ibm webpshere
Ibm webpshereIbm webpshere
Ibm webpshere
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
 
Dean4j@Njug5
Dean4j@Njug5Dean4j@Njug5
Dean4j@Njug5
 
Best node js course
Best node js courseBest node js course
Best node js course
 
Dev ops
Dev opsDev ops
Dev ops
 
The Web on Windows
The Web on WindowsThe Web on Windows
The Web on Windows
 
Web performance
Web  performance Web  performance
Web performance
 
Production debugging web applications
Production debugging web applicationsProduction debugging web applications
Production debugging web applications
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
 
ConFoo 2017: Introduction to performance optimization of .NET web apps
ConFoo 2017: Introduction to performance optimization of .NET web appsConFoo 2017: Introduction to performance optimization of .NET web apps
ConFoo 2017: Introduction to performance optimization of .NET web apps
 
PHP Performance: Principles and tools
PHP Performance: Principles and toolsPHP Performance: Principles and tools
PHP Performance: Principles and tools
 
Documenting Your API
Documenting Your APIDocumenting Your API
Documenting Your API
 
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim SummitIntroduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim Summit
 
AWS Summit 2013 | Auckland - Powering Start-ups with AWS
AWS Summit 2013 | Auckland - Powering Start-ups with AWSAWS Summit 2013 | Auckland - Powering Start-ups with AWS
AWS Summit 2013 | Auckland - Powering Start-ups with AWS
 
Apache Solr - An Experience Report
Apache Solr - An Experience ReportApache Solr - An Experience Report
Apache Solr - An Experience Report
 
Production Debugging War Stories
Production Debugging War StoriesProduction Debugging War Stories
Production Debugging War Stories
 
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
Apache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 MistakesApache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 Mistakes
 

Último

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Node.js in Production