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

  • Home
  • SEARCH
  • 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 6922275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:23:06+00:00 2026-05-27T10:23:06+00:00

i am going to have a website with 20k+ concurrent users. i am going

  • 0

i am going to have a website with 20k+ concurrent users.

i am going to use mongodb using one management node and 3 or more nodes for data sharding.

now my problem is maximum connections. if i have that many users accessing the database, how can i make sure they don’t reach the maximum limit? also do i have to change anything maybe on the kernel to increase the connections?

basically the database will be used to keep hold of connected users to the site, so there are going to be heavy read/write operations.

thank you in advance.

  • 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-05-27T10:23:07+00:00Added an answer on May 27, 2026 at 10:23 am

    You don’t want to open a new database connection each time a new user connects. I don’t know if you’ll be able to scale to 20k+ concurrent users easily, since MongoDB uses a new thread for each new connection. You want your web app backend to have just one to a few database connections open and just use those in a pool, particularly since web usage is very asynchronous and event driven.

    see: http://www.mongodb.org/display/DOCS/Connections

    The server will use one thread per TCP
    connection, therefore it is highly recomended that your application
    use some sort of connection pooling. Luckily, most drivers handle this
    for you behind the scenes. One notable exception is setups where your
    app spawns a new process for each request, such as CGI and some
    configurations of PHP.

    Whatever driver you’re using, you’ll have to find out how they handle connections and if they pool or not. For instance, Node’s Mongoose is non-blocking and so you use one connection per app usually. This is the kind of thing you probably want.

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

Sidebar

Related Questions

I have a website and going to extend it, so users will upload their
I have a website where users are going to submit files (pdf, doc, xls).
I have a Joomla Website located at http://www.MikeSilvis.com , and upon going to the
I have 51 GB of HTTP (Apache) access logs for my website going back
I think I'm going to have to use the Crypto libraries in my iPhone
I've been asked to develop a website for the iPad. It's going to have
I have a website (python/django) that needs to use a load of Java resources
We have a project that needs to gather survey data. On one particular page
I have put together an example page detailing my problem My website is going
So, I have a website that figures out the users location when they load

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.