Learn how to debug and optimize the performance of your Node.js applications.
Overview
Syllabus
Introduction
- The power of debugging and performance tuning
- What you should know
- Using challenges
- Configuring your development environment
- Demo application tour
- Finding what went wrong
- Why measure performance?
- Documenting problems
- When is a problem resolved?
- What's a microservice architecture?
- Microservice rock, paper, scissors
- Introducing PM2 for process management
- Managing microservices with PM2
- Why and what should I log?
- Problems with Node.js console
- Implementing Express error pages
- Choosing a logging library
- Adding Winston for Node logging
- Request logging with Morgan
- Correlating requests in logs
- Cross-application request correlation
- Challenge: Cross-application request IDs
- Solution: Cross-application request IDs
- Debugging isn't just logging
- Introducing Node's built-in debugger
- Command-line debugging with Node inspect
- Debugging Node in Chrome DevTools
- Debugging Node with Visual Studio Code
- Benchmarking performance
- Benchmarking with ApacheBench
- Benchmarking code with Winston
- Profiling code execution
- Knowing what to optimize
- Caching fundamentals
- Next steps
Taught by
Jon Peck