SlideShare a Scribd company logo
INTOTHE WILD WITH
NODE.JS AND WEB APPS
Node.jsTalk at Klout, 2012
Chris Bumgardner
Friday, April 20, 12
ME
• Co-founder and Chief-Programmer of AskYourUsers.com
• @chrisbumgardner and cbumgard@gmail.com
• github.com/cbumgard
• My first ‘real’ production web app in Node.js
• Invite only beta, going live this week.
Friday, April 20, 12
THE STACK
• Node.js
• Express
• MongoDB
• Redis
• Apache Solr
• Nginx / Ubuntu 11 / 2 x LinodeVPS
Friday, April 20, 12
CONFIGURATION
• Partition your configuration by environment.
• E.g. Config[process.env.NODE_ENV]
• We have 3 environments: 2 dev and 1 production.
• Environment is top-level namespace (‘dev’,‘production’, etc)
for everything, including db. Keeps worlds from colliding.
• Makes life easy
Friday, April 20, 12
CONFIGURATION 2
• dev env 1: sessions in memory, clean db each start.
• dev env 2: persistent sessions & db, ssl.
• production env: aggressive caching, ssl, live payments, clustered,
fancier logging (more later), email/sms notifications.
Friday, April 20, 12
LOGGING
• Log early and often.
• Using Winston with the MongoDB transport.
• MongoDB logging: fast writes; pass json objs in log msgs; easy
ad-hoc queries; easy lru via capped collections.
• Client logging from browser: caught and logged to Google
Analytics as custom event. Easy monitoring/aggregation.
Friday, April 20, 12
DEPLOYMENT
• Custom CI system in node that responds pushes to github
• Post-Receive service hook. Github POSTs to us after a push.
• CI will pull code if it’s the right branch (say ‘staging’), restart,
and send SMS.
• Easy and low touch.Texts from your node are nice.
• Refactoring into a more modular/decoupled hook.io system.
Friday, April 20, 12
ALSO
• In development: use ‘nodemon’ to start server.
• Watches all files in project and restarts node if anything
changes.
• Great with persistent sessions, test changes immediately.
• In production: use ‘forever’ to start server as daemon. Restarts
node automatically if it crashes. Runs in background. Nice CLI.
Manages stdout/stderr logs.Tracks multiple processes.
Friday, April 20, 12
CLUSTERING
• In production, use ‘cluster’ module to fork separate node per
core
• App-wide initialization: if cluster.isMaster
• Otherwise per-proc initialization
Friday, April 20, 12
DEPENDENCIES
• Found out the hard way to control node, npm, and dependent
module versions.You don’t want to push a change to
production and have npm barf. No bueno.
• Keep them the same on all machines.
• Use npm in development.
• In production I recommend bundling/controlling the deps and
versions explicitly.
Friday, April 20, 12
PROFILING
• ‘ab’ is your friend.
• don’t forget ulimit.
• Joyent has great video on profiling with dtrace.
• ‘nodetime’ module: great in development, but my server got
hosed when I tried it in production. Probably user error.
Friday, April 20, 12
THANKS!
(you can email me at cbumgard@gmail.com)
Beyond the Closed Beta, Node.js from code to
production (at scale)
Node.js ++ (Serverside Javascripters) Club SF
Friday, April 20, 12

More Related Content

What's hot

Virtual Machine LAMP on Windows
Virtual Machine LAMP on WindowsVirtual Machine LAMP on Windows
Virtual Machine LAMP on Windows
mikehie
 
Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk
brandongulla
 
Puppet - Instant Data Center
Puppet  - Instant Data CenterPuppet  - Instant Data Center
Puppet - Instant Data Center
Bryan Belanger
 
Ansible
AnsibleAnsible
Ansible
gnosek
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
Chris Cowan
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
Victor Reyes Heitmann
 
Node
NodeNode
Node
Arjun Raj
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
Joseph de Castelnau
 
Herramientas front
Herramientas frontHerramientas front
Herramientas front
borya09
 
Building a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBBuilding a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDB
VivochaLabs
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
David Ashton
 
Introduction to node
Introduction to nodeIntroduction to node
Introduction to node
girish82
 
Vagrant: Your Personal Cloud
Vagrant: Your Personal CloudVagrant: Your Personal Cloud
Vagrant: Your Personal Cloud
James Wickett
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
Ricardo Castelhano
 
Nodejs
NodejsNodejs
Nodejs
Prem Sanil
 
Müssen es denn immer gleich Docker und Kubernetes sein?!
Müssen es denn immer gleich Docker und Kubernetes sein?!Müssen es denn immer gleich Docker und Kubernetes sein?!
Müssen es denn immer gleich Docker und Kubernetes sein?!
inovex GmbH
 
Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)
Smriti Tuteja
 
Docker
DockerDocker
VMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletion
VMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletionVMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletion
VMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletion
Ben Smogolski
 
Version Controlling
Version ControllingVersion Controlling
Version Controlling
Vaidik Kapoor
 

What's hot (20)

Virtual Machine LAMP on Windows
Virtual Machine LAMP on WindowsVirtual Machine LAMP on Windows
Virtual Machine LAMP on Windows
 
Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk
 
Puppet - Instant Data Center
Puppet  - Instant Data CenterPuppet  - Instant Data Center
Puppet - Instant Data Center
 
Ansible
AnsibleAnsible
Ansible
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
 
Node
NodeNode
Node
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Herramientas front
Herramientas frontHerramientas front
Herramientas front
 
Building a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBBuilding a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDB
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
 
Introduction to node
Introduction to nodeIntroduction to node
Introduction to node
 
Vagrant: Your Personal Cloud
Vagrant: Your Personal CloudVagrant: Your Personal Cloud
Vagrant: Your Personal Cloud
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
 
Nodejs
NodejsNodejs
Nodejs
 
Müssen es denn immer gleich Docker und Kubernetes sein?!
Müssen es denn immer gleich Docker und Kubernetes sein?!Müssen es denn immer gleich Docker und Kubernetes sein?!
Müssen es denn immer gleich Docker und Kubernetes sein?!
 
Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)
 
Docker
DockerDocker
Docker
 
VMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletion
VMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletionVMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletion
VMwarevSphere_ConfigureAdvancedHighAvailabilityFeatures_CertificateOfCompletion
 
Version Controlling
Version ControllingVersion Controlling
Version Controlling
 

Viewers also liked

Top 10 finais de séries mais emocionantes
Top 10 finais de séries mais emocionantesTop 10 finais de séries mais emocionantes
Top 10 finais de séries mais emocionantes
Fábio Lins
 
Into the wild
Into the wildInto the wild
Into the wild
Saïd Sitto
 
""Into the Wild" ... with Natural Language Processing and Text Classification...
""Into the Wild" ... with Natural Language Processing and Text Classification...""Into the Wild" ... with Natural Language Processing and Text Classification...
""Into the Wild" ... with Natural Language Processing and Text Classification...
Dataconomy Media
 
Doppelganger Breaking Bad
Doppelganger Breaking BadDoppelganger Breaking Bad
Doppelganger Breaking Bad
Andrea Dale
 
Into the wild
Into the wildInto the wild
Into the wild
amccaff
 
Jornada do Herói em Breaking Bad
Jornada do Herói em Breaking BadJornada do Herói em Breaking Bad
Jornada do Herói em Breaking Bad
Mateus Oazem
 
Into the Wild
Into the WildInto the Wild
Into the Wild
Renu Ramesh
 
Breaking bad powerpoint aleix mando
Breaking bad powerpoint aleix mandoBreaking bad powerpoint aleix mando
Breaking bad powerpoint aleix mando
Mari Carmen Moreno
 
Breaking Bad: Todos los personajes Parte 1
Breaking Bad: Todos los personajes Parte 1Breaking Bad: Todos los personajes Parte 1
Breaking Bad: Todos los personajes Parte 1
alberts1999
 
Into the Wild: A Critical Analysis
Into the Wild: A Critical AnalysisInto the Wild: A Critical Analysis
Into the Wild: A Critical Analysis
keithchrisman
 
Diary of Chris McCandless
Diary of Chris McCandlessDiary of Chris McCandless
Diary of Chris McCandless
alvinchen977
 
Presentation on Breaking
Presentation on BreakingPresentation on Breaking
Presentation on Breaking
Usoa Sol
 
Breaking bad news in obstetrics
Breaking bad news in obstetricsBreaking bad news in obstetrics
Breaking bad news in obstetrics
Dibu Sam
 
Breaking bad
Breaking badBreaking bad
Breaking bad
sallyhossack
 
Breaking bad
Breaking badBreaking bad
Breaking bad
nehanda1234
 
Breaking bad powerpoint
Breaking bad powerpointBreaking bad powerpoint
Breaking bad powerpoint
Cmcaprietta
 
The Heisenberg Principles: 5 Business Lessons from Breaking Bad
The Heisenberg Principles: 5 Business Lessons from Breaking BadThe Heisenberg Principles: 5 Business Lessons from Breaking Bad
The Heisenberg Principles: 5 Business Lessons from Breaking Bad
Justin Oh
 
Teoria das cores e Breaking Bad
Teoria das cores e Breaking BadTeoria das cores e Breaking Bad
Teoria das cores e Breaking Bad
Wilson Souza
 
Breaking bad news ----
Breaking bad news ----Breaking bad news ----
Breaking bad news ----
Pk Doctors
 

Viewers also liked (19)

Top 10 finais de séries mais emocionantes
Top 10 finais de séries mais emocionantesTop 10 finais de séries mais emocionantes
Top 10 finais de séries mais emocionantes
 
Into the wild
Into the wildInto the wild
Into the wild
 
""Into the Wild" ... with Natural Language Processing and Text Classification...
""Into the Wild" ... with Natural Language Processing and Text Classification...""Into the Wild" ... with Natural Language Processing and Text Classification...
""Into the Wild" ... with Natural Language Processing and Text Classification...
 
Doppelganger Breaking Bad
Doppelganger Breaking BadDoppelganger Breaking Bad
Doppelganger Breaking Bad
 
Into the wild
Into the wildInto the wild
Into the wild
 
Jornada do Herói em Breaking Bad
Jornada do Herói em Breaking BadJornada do Herói em Breaking Bad
Jornada do Herói em Breaking Bad
 
Into the Wild
Into the WildInto the Wild
Into the Wild
 
Breaking bad powerpoint aleix mando
Breaking bad powerpoint aleix mandoBreaking bad powerpoint aleix mando
Breaking bad powerpoint aleix mando
 
Breaking Bad: Todos los personajes Parte 1
Breaking Bad: Todos los personajes Parte 1Breaking Bad: Todos los personajes Parte 1
Breaking Bad: Todos los personajes Parte 1
 
Into the Wild: A Critical Analysis
Into the Wild: A Critical AnalysisInto the Wild: A Critical Analysis
Into the Wild: A Critical Analysis
 
Diary of Chris McCandless
Diary of Chris McCandlessDiary of Chris McCandless
Diary of Chris McCandless
 
Presentation on Breaking
Presentation on BreakingPresentation on Breaking
Presentation on Breaking
 
Breaking bad news in obstetrics
Breaking bad news in obstetricsBreaking bad news in obstetrics
Breaking bad news in obstetrics
 
Breaking bad
Breaking badBreaking bad
Breaking bad
 
Breaking bad
Breaking badBreaking bad
Breaking bad
 
Breaking bad powerpoint
Breaking bad powerpointBreaking bad powerpoint
Breaking bad powerpoint
 
The Heisenberg Principles: 5 Business Lessons from Breaking Bad
The Heisenberg Principles: 5 Business Lessons from Breaking BadThe Heisenberg Principles: 5 Business Lessons from Breaking Bad
The Heisenberg Principles: 5 Business Lessons from Breaking Bad
 
Teoria das cores e Breaking Bad
Teoria das cores e Breaking BadTeoria das cores e Breaking Bad
Teoria das cores e Breaking Bad
 
Breaking bad news ----
Breaking bad news ----Breaking bad news ----
Breaking bad news ----
 

Similar to Into the Wild with Node.js and Web Apps

Deploy meteor in production
Deploy meteor in productionDeploy meteor in production
Deploy meteor in production
Miro Radenovic
 
Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)
David Neal
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
Jacob Nelson
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
Giuseppe Maxia
 
V mware
V mwareV mware
V mware
dvmug1
 
Puppet Primer, Robbie Jerrom, Solution Architect VMware
Puppet Primer, Robbie Jerrom, Solution Architect VMwarePuppet Primer, Robbie Jerrom, Solution Architect VMware
Puppet Primer, Robbie Jerrom, Solution Architect VMware
subtitle
 
Minimal OpenStack LinuxCon NA 2015
Minimal OpenStack LinuxCon NA 2015Minimal OpenStack LinuxCon NA 2015
Minimal OpenStack LinuxCon NA 2015
Sean Dague
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
LinkMe Srl
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
PoojaSingh1123
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from Docker
John Griffith
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
adrian_nye
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
Bhargav Anadkat
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
Docker, Inc.
 
Node.js
Node.jsNode.js
Nodejs
NodejsNodejs
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
Sreenivas Kappala
 
Running Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic BeanstalkRunning Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic Beanstalk
zupzup.org
 
Parallelizing CI using Docker Swarm-Mode
Parallelizing CI using Docker Swarm-ModeParallelizing CI using Docker Swarm-Mode
Parallelizing CI using Docker Swarm-Mode
Akihiro Suda
 
Building Open-source React Components
Building Open-source React ComponentsBuilding Open-source React Components
Building Open-source React Components
Zack Argyle
 
Building Open-Source React Components
Building Open-Source React ComponentsBuilding Open-Source React Components
Building Open-Source React Components
Zack Argyle
 

Similar to Into the Wild with Node.js and Web Apps (20)

Deploy meteor in production
Deploy meteor in productionDeploy meteor in production
Deploy meteor in production
 
Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)Intro to Node.js (for .NET Developers)
Intro to Node.js (for .NET Developers)
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
V mware
V mwareV mware
V mware
 
Puppet Primer, Robbie Jerrom, Solution Architect VMware
Puppet Primer, Robbie Jerrom, Solution Architect VMwarePuppet Primer, Robbie Jerrom, Solution Architect VMware
Puppet Primer, Robbie Jerrom, Solution Architect VMware
 
Minimal OpenStack LinuxCon NA 2015
Minimal OpenStack LinuxCon NA 2015Minimal OpenStack LinuxCon NA 2015
Minimal OpenStack LinuxCon NA 2015
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from Docker
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Node.js
Node.jsNode.js
Node.js
 
Nodejs
NodejsNodejs
Nodejs
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
Running Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic BeanstalkRunning Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic Beanstalk
 
Parallelizing CI using Docker Swarm-Mode
Parallelizing CI using Docker Swarm-ModeParallelizing CI using Docker Swarm-Mode
Parallelizing CI using Docker Swarm-Mode
 
Building Open-source React Components
Building Open-source React ComponentsBuilding Open-source React Components
Building Open-source React Components
 
Building Open-Source React Components
Building Open-Source React ComponentsBuilding Open-Source React Components
Building Open-Source React Components
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 

Into the Wild with Node.js and Web Apps

  • 1. INTOTHE WILD WITH NODE.JS AND WEB APPS Node.jsTalk at Klout, 2012 Chris Bumgardner Friday, April 20, 12
  • 2. ME • Co-founder and Chief-Programmer of AskYourUsers.com • @chrisbumgardner and cbumgard@gmail.com • github.com/cbumgard • My first ‘real’ production web app in Node.js • Invite only beta, going live this week. Friday, April 20, 12
  • 3. THE STACK • Node.js • Express • MongoDB • Redis • Apache Solr • Nginx / Ubuntu 11 / 2 x LinodeVPS Friday, April 20, 12
  • 4. CONFIGURATION • Partition your configuration by environment. • E.g. Config[process.env.NODE_ENV] • We have 3 environments: 2 dev and 1 production. • Environment is top-level namespace (‘dev’,‘production’, etc) for everything, including db. Keeps worlds from colliding. • Makes life easy Friday, April 20, 12
  • 5. CONFIGURATION 2 • dev env 1: sessions in memory, clean db each start. • dev env 2: persistent sessions & db, ssl. • production env: aggressive caching, ssl, live payments, clustered, fancier logging (more later), email/sms notifications. Friday, April 20, 12
  • 6. LOGGING • Log early and often. • Using Winston with the MongoDB transport. • MongoDB logging: fast writes; pass json objs in log msgs; easy ad-hoc queries; easy lru via capped collections. • Client logging from browser: caught and logged to Google Analytics as custom event. Easy monitoring/aggregation. Friday, April 20, 12
  • 7. DEPLOYMENT • Custom CI system in node that responds pushes to github • Post-Receive service hook. Github POSTs to us after a push. • CI will pull code if it’s the right branch (say ‘staging’), restart, and send SMS. • Easy and low touch.Texts from your node are nice. • Refactoring into a more modular/decoupled hook.io system. Friday, April 20, 12
  • 8. ALSO • In development: use ‘nodemon’ to start server. • Watches all files in project and restarts node if anything changes. • Great with persistent sessions, test changes immediately. • In production: use ‘forever’ to start server as daemon. Restarts node automatically if it crashes. Runs in background. Nice CLI. Manages stdout/stderr logs.Tracks multiple processes. Friday, April 20, 12
  • 9. CLUSTERING • In production, use ‘cluster’ module to fork separate node per core • App-wide initialization: if cluster.isMaster • Otherwise per-proc initialization Friday, April 20, 12
  • 10. DEPENDENCIES • Found out the hard way to control node, npm, and dependent module versions.You don’t want to push a change to production and have npm barf. No bueno. • Keep them the same on all machines. • Use npm in development. • In production I recommend bundling/controlling the deps and versions explicitly. Friday, April 20, 12
  • 11. PROFILING • ‘ab’ is your friend. • don’t forget ulimit. • Joyent has great video on profiling with dtrace. • ‘nodetime’ module: great in development, but my server got hosed when I tried it in production. Probably user error. Friday, April 20, 12
  • 12. THANKS! (you can email me at cbumgard@gmail.com) Beyond the Closed Beta, Node.js from code to production (at scale) Node.js ++ (Serverside Javascripters) Club SF Friday, April 20, 12