Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Any Pointers on How Can I Speed Up my Node.js Application?

    • 0
    • 0
    • 0
    • 2
    • 0
    • 0
    • 0
    • 1.24k
    Answer it

    Performance optimization

    I am planning to develop a new web application using Nodejs and I want it to make it  faster than usual in order to keep it ahead in the competitive fast web technology. So can anyone please suggest some possible steps and pointers through which I can speed up my Node.Js application.

 2 Answer(s)

  • I suppose with speedup you mean serving too many clients without slowing down your server. One response will always take the time it needs, the question is for a response not to wait until another finishes. You cannot speed up nodejs more than it is capable (assuming you have written the most performant code possible), but you can scale your application. Some steps i can suggest: 1.put nginx in front of node for load balancing 2.run node app in different ports as many times as processor cores you have (if in the same machine with nginx, leave smth for it) 3.setup some speedy mechanisms for shared states of your app 4. setup your backend db the same way as node load balancing

    this way you can multiply the number of clients served in a certain time and (the most important) be able to rescale horizontally without much pain. br Armando

  • I'd start by profiling the app to work out which parts take the most time and so are worth optimizing. Node has a profiler built in that's pretty easy to use...

    https://nodejs.org/en/docs/guides/simple-profiling/

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: