Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:51:07+00:00 2026-06-04T12:51:07+00:00

My app uses node.js, because node.js and Mongo are a perfect match made in

  • 0

My app uses node.js, because node.js and Mongo are a perfect match made in heaven. But I am wondering about this:

My server app runs in a single process. Node.js is async, but single-threaded, would that mean that node will not send two queries at once to the mongo server?

On the server, Mongod runs with 5 worker processes. Are those necessary? Can I just reduce it to one, and it works just as fine? (And if so, how?)

Or maybe there’s a way to make my node app run on several processes, effectively.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:51:08+00:00Added an answer on June 4, 2026 at 12:51 pm

    would that mean that node will not send two queries at once to the
    mongo server?

    1. Indeed, Node will SEND requests synchronously to mongo. Sending requests however is done in a heartbeat (usually low milliseconds range) .

    2. The number-crunshing stuff happens at the mongo-side, which has to do the hard stuff of making a response. This is what the mongo worker processes are for, and is done in parallel (5 workers equals 5 threads) NOTE: Node will not block while mongo is calculating this repsonse

    3. In the end mongo sends it’s response(s) which you capture in node using a (async) callback.

    p.s: so imo no need to cluster just yet. It’s nice asynchronous as it is. (Besides hitting mongo with lots of requests is more than likely IO bound, so ‘clustering’ it so other cpu’s can share the load isn’t going to be much help in that case.

    hth

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app uses a lot of memory. Normally it runs fine, but on a
I am building a small app that uses backbone.js on the client side, node.js/socket.io
I have a module I created for a node.js app. The app also uses
My app uses an API from an external JAR file. This JAR file has
I am unsure about how to completely kill a node that uses graphics in
We have a node.js app that uses node_msyql , a great little library for
I'm creating an app that uses Rails to serve webpages and node.js/socket.io to facilitate
My app uses a database, it comes pre-populated with about 50 values. I'm accomplishing
My app uses SSL to communicate securely with a server and it's having trouble
My node.js app uses express, socket.io and talks to mongodb through mongoose. All these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.