Hi Abhishek!
It's not recommended to keep MongoDB and Node.js app on the same server. In a production env, MongoDB will need more RAM for indexing. If you keep both of them on the same server, performance might be degraded. So, it' a good idea to install them on two separate machines. To minimize the latency, you can keep both of the machines in the same private network and use private IP to communicate.
Does this help?