admin管理员组

文章数量:1401133

Is there somebody that has experience using mongoose.js as Node.js mapper for Mongodb at high scale?

I am wondering if I should use the native driver, so I keep everything lightweight or to write a simple wrapper.

If anybody got some tips, advise thank you very much.

Is there somebody that has experience using mongoose.js as Node.js mapper for Mongodb at high scale?

I am wondering if I should use the native driver, so I keep everything lightweight or to write a simple wrapper.

If anybody got some tips, advise thank you very much.

Share Improve this question asked Aug 15, 2012 at 19:19 onlineracoononlineracoon 2,9705 gold badges48 silver badges66 bronze badges 2
  • 1 Pretty sure mongoose uses the native driver under the hood. mongoosejs./docs/api.html – Paul Commented Aug 15, 2012 at 19:32
  • It does, and mongoose also makes it easy to directly use native calls when needed. – JohnnyHK Commented Aug 15, 2012 at 20:00
Add a ment  | 

2 Answers 2

Reset to default 3

A little late to the party some but according to this article Mongoose performs worse pared to the native MongoDB Node.js client. More or less Mongoose is slower (ops/sec) for every single metric collected (queries and inserts).

Source code with the benchmarks can be found here

Unless you really need an ORM\ODM I remended you don't use Mongoose at all.

It seems most people (including me, briefly) are you using Mongoose because the native driver's api is to cluncky and difficult to understand.

That's why I have switch to mongojs. Mongojs is a module that wraps the native driver but with much cleaner api that is almost identical to mongo shell.

I can't really ment on the scalability of Mongoose but mongojs is just that, a lightweight wrapper around the native driver.

本文标签: javascriptNodejs mongoose performanceStack Overflow