Some thoughts on MongoDB Nodejs driver

I am in the process of evaluating mongoDB for one of the product requirements. We were on the J2EE stack and MongoDB has java driver with which we got awesome results compared to the existing framework in terms of not only speed and resource utilization but also in terms data replication and fail-over behavior.

I was curious about mongoDB nodejs driver and tried to test its performance over java driver. It was very easy to write code as I was already familiar with javascript and the footprint, startup time are far less compared to the J2EE stack.

Now comes the real problem with NodeJS. My application typically tries to connect to different database for each request and existing nodejs api does not support to use same driver across different requests rendering the connection pooling offered by the framework useless !!!. I need to create server instance for each request.

With  read preference as NEAREST, the reads are not shared across the replica set members and only the member on which my nodejs is running is being hit resulting in performance degradation compared to my existing framework.

Here is the stackoverflow question raised regarding the same issue.

Think twice before planning to use nodejs driver. 

Comments

Popular posts from this blog

Proper way to have an anchor tag with onclick event

My FIRE Journey

CORS issues with IE9 and workarounds