Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

NodeConf OneShot Budapest — Production Ready Node.js by Nuno Job

1,062 views

Published on

A tale on building stable node.js services with a focus on performance. We will discuss what we learned over the years running node in production, and what tools and processes we use to help customers with large production node.js services find bottlenecks in their applications..

Published in: Technology
  • Be the first to like this

NodeConf OneShot Budapest — Production Ready Node.js by Nuno Job

  1. 1. Production Ready Node
  2. 2. Alice in Noderland
  3. 3. The Curious Case of Nodej(s)amin Button
  4. 4. $ whoami { username: ‘@dscape’, past: ‘nodejitsu.com’, present: ‘yld.io’, much_excite: ‘open source’, dreams_in: JSON, node_modules: Number.MAX_VALUE }
  5. 5. $ whoami { username: ‘@dscape’, past: ‘nodejitsu.com’, present: ‘yld.io’, much_excite: ‘open source’, dreams_in: JSON, node_modules: ~40 }
  6. 6. $ watiznode4 __________________________________ < node is more than just rest apis > ---------------------------------- ^__^ (oo)_______ (__) )/ ||----w | || ||
  7. 7. How is node being used? Enterprise Startups and Hackers • (micro) Services • REST APIs • Message Queues • Fullstack Web Applications • Mobile • Enterprise Software • Internet of Things • Desktop Clients • Command Line Interfaces • Teaching • WebRTC • ROBOTS! • Bitcoin • Torrents • Databases
  8. 8. INTRODUCTION SUCH NODE. MUCH WOW
  9. 9. INTRODUCTION USE CASES Buy all that stuff you want directly from your phone. Node got you covered. Find where to go on your awesome vacation with proxies powered by the Nodes. Control your heating from your mobile using the awesome power of the Node.js force
  10. 10. INTRODUCTION TABLE OF CONTENTS • Frameworks • Structure • Setup • Testing & Coverage • Useful tools • Pre-production checklist • Running in production
  11. 11. FRAMEWORK WHAT TO CHOOSE
  12. 12. Structure
  13. 13. STRUCTURE MODULE
  14. 14. STRUCTURE COMMAND LINE TOOL
  15. 15. STRUCTURE WEB APP
  16. 16. STRUCTURE REST API
  17. 17. “Does it matter?”
  18. 18. Setup
  19. 19. SETUP CONFIGURATION FILES
  20. 20. SETUP CONFIGURATION FILES, TO AVOID
  21. 21. SETUP JSHINT
  22. 22. SETUP CODE STYLE
  23. 23. SETUP PRE COMMIT HOOKS
  24. 24. SETUP PRE COMMIT HOOKS (2)
  25. 25. SETUP BADGER BADGER BADGER MUSHROOM MUSHROOM
  26. 26. Testing
  27. 27. TESTING NODE ERROR HANDLING
  28. 28. TESTING COVERAGE CONTRACT
  29. 29. TESTING PERFORMANCE
  30. 30. TESTING PERFORMANCE (2)
  31. 31. TESTING PERFORMANCE
  32. 32. Pre-production checklist
  33. 33. $ shipit _____________________________ < nodejs production checklist > ----------------------------- ^__^ (oo)_______ (__) )/ ||----w | || ||
  34. 34. PRE-PRODUCTION CHECKLIST OUTDATES MODULES
  35. 35. PRE-PRODUCTION CHECKLIST SECURITY SANITY CHECK
  36. 36. PRE-PRODUCTION CHECKLIST FREEZE YOUR DEPENDENCIES
  37. 37. Useful tools
  38. 38. USEFUL TOOLS JSONTOOL
  39. 39. USEFUL TOOLS ND
  40. 40. USEFUL TOOLS GHCOPY
  41. 41. USEFUL TOOLS NODE DEBUG
  42. 42. Running in Production
  43. 43. RUNNING IN PRODUCTION • pm2 vs forever vs mon • cluster vs mongroup • docker vs jenkins + chef vs PaaS • Managing the life cycle of applications
  44. 44. RUNNING IN PRODUCTION
  45. 45. RUNNING IN PRODUCTION • pm2 vs forever vs mon • cluster vs mongroup • docker vs jenkins + chef vs PaaS • Managing the life cycle of applications
  46. 46. @DSCAPE THANK YOU

×