1

I was thinking about building some kind of API built on NodeJS with mongoose. I read that mongoose uses 1 connection per app.

But let us say that we have 300,000 users joining a room to answer some questions (real-time), will mongoose/mongodb handle it? Or will the server itself even handle it?

CDspace
  • 2,639
  • 18
  • 30
  • 36

1 Answers1

0

Thinking on the database side only:

The mongod executable have a parameter (--maxConns) for setting the maximum number of connections, prior to v2.6 you had a limit for that. Now, as the docs say: "This setting has no effect if it is higher than your operating system’s configured maximum connection tracking threshold", see here for linux.

Besides that you MUST consider a sharded cluster for this kind of load.

Community
  • 1
  • 1