Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NodeJS in Production

Mark Wolfe
October 22, 2014

NodeJS in Production

Talk I gave at NodeJS meetup in Melbourne about running and monitoring applications in production.

Mark Wolfe

October 22, 2014
Tweet

More Decks by Mark Wolfe

Other Decks in Technology

Transcript

  1. Some Background Ninjablocks has been using NodeJS for ~3 years

    Used in a range of web and realtime services Running on Heroku and AWS Also running on 1000s ARM devices
  2. Operational Visibility Add graphs for things business metrics! Add graphs

    for key system performance metrics Tune logging to remove noise Simple deterministic deployment process Error Monitoring
  3. Operational Visibility cont. Get a chat room for ops events,

    Engineering hipchat slack All events go to this room commits + deploys + badness + gifs
  4. Graphs Business Metrics! Orders, Payments and Signups CPU Usage /

    Load Memory Usage RSS (Resident Set Size) and V8 Heap Total / Used Event Loop Delay
  5. Logging What happened? When did this happen? Where in our

    codebase did this happen? File and Line Number Visible from anywhere and searchable
  6. Health Checks Health Checks SQL server connection status Redis connection

    status Anything your app depends on to operate
  7. Memory Leaks Every production node app I have seen has

    them V8 Memory leaks Buffer leaks (fragmentation) Everything is Lazy
  8. Eliminating Leaks v8 profiler, learn to use it node-tick (more

    links in readme) Watch the v8 tuning presentations! Why bother?