#NeedToNode Recap: Successfully Managing Production Node.js
Today, we had our monthly #NeedToNode webinar with our own Nathan White. Nathan talked about how to successfully manage applications built with Node.js in a production environment, discussing the various ideas, tools, and methods developers can use to make their Node.js applications succeed.
Top 3 Takeaways
- Defining and knowing your internal coding standards is a vital tool for managing your code successfully long-term.
- Microservices have a large amount of benefits for innovative development within a company.
- Deployment is tricky - Docker is a maintainable way to get started with fast, concise, and simple deployments.
Video
Recap
Communication is vitally important. Understanding your application and having good reasons for your decisions is key to strong longer-term successful deployments.
Your software development lifecycle is vitally important to long-term success. Establishing processes of how to handle different events, such as a failure in production, allows you to provide a set path to know how you develop, deploy, and maintain your software in an efficient way in the long-term so you don't end up repeating mistakes.
If you have a monolithic application, your teams are relegated to specific sections that they can touch, and are denied access to others they might need to understand or work on. With microservices, you enable different cross-sections of your teams to have role-appropriate access to the different services they might need to work on or understand.
There's not one right way to use npm on a large scale. There are many different ways to manage your dependencies - a plethora of options that are to figure out correctly. There's a large amount of small, moving parts that you will need to account for. Finding an efficient way to cache them, like npm Enterprise, Sinopia, local-npm provides
With monitoring, APM tools, like Dynatrace, can get you a long way with getting you insight into your processes with little friction. That said, understanding other, more self-reliant tools is always beneficial. It allows you to understand a wider spectrum of how monitoring can be done, and how it can be put to use most effectively for your deployments.
Deployment is greatly improved with containerization. It has many benefits, but one simple and important one is that it allows for self-documenting infrastructure. With the way you build a container, via a Dockerfile or similar, you get a layout for the exact structure of what will be in the container, what it should be doing, and how it will be doing it. You end up limiting the scope to the bare minimum needed tools and resources to accomplish your goal within the container.
Sticking to the Node.js LTS is a good plan for most deployments of Node.js. Right now, Node.js v4 is LTS - v6 is becoming LTS in October, but still has active development and has the possibility of adding or removing features that you want or need to use. Until v6 becomes the currently active LTS, the v4 LTS is your best bet for a highly stable platform.
Resources
CI Tools
Code Standards
npm
Containers and Microservices
Monitoring
Connect
Be sure to attend the next #NeedToNode, featuring Trevor Norris talking about the AsyncWrap API. Follow @NodeSource on Twitter to learn more and know when the sign up is available!