Node.JS and Performance

Under high load (high concurrency), Node.js maintains high throughput and low latency Three factors underpin Node’s high performance:

  1. The V8 JavaScript engine, upon which Node.js is based, is highly optimized for performance by Google, who continues to invest heavily in advancing V8’s performance

  2. JavaScript/Node.js events are lightweight, while threads are heavyweight. Consequently, Node.js is inherently more performant under load than monolithic designs (this article offers a nice recap)

  3. Node.js is container-ready, which simplifies the move to cloud and microservices architectures (Richard Rodger, author of The Tao of Microservices, explains)

Some Customers giants using node js Performance facts:

  1. Groupon Node.js implementation reduced page load times by 50%
  2. PayPal Node.js App doubled the number of requests per second and reduced response time by 35% versus previous Java version

  1. GoDaddy rolled out global site rebrand in 1 hour

4.

  1. Netflix has moved monolithic Java architecture to node.JS Netflix improved performance and reduced infrastructure costs:

  2. Reduced startup time from 40 mins to sub 1 minute

  3. Reduced the number of EC2 instances on Node compared with the legacy Java stack by 75%, while serving the same number of subscribers at lower latencies

There are sometimes problems that you can't diagnose expediently, or issues such as memory leaks.

So what can we do when we encounter these issues?

Do Post-Mortem analysis:

  1. Capture a core dump of running process at any time in production to capture all of the state the process and then reboot it.
  2. there ar tools that can be used like: mdb_v8, linode and IBM's IDDE
  3. this offers to Node js engineers several advantages including:

      \* Allows service to stay up while developers investigate the problem \(high availability\)
    
      \* Allows several developers to investigate the same problem not at the same time \(collaboration\)
    
      \* Allows developers to investigate issues at any time that is convenient for them
    

    For further details you can see the Node.JS Core Post-Mortem Working Group and best practices from Netflix maintaining high performance in large scale production Node.js applications

    Note: there are some problems when trying to do post mortem with promises

results matching ""

    No results matching ""