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 8868021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:10:05+00:00 2026-06-14T17:10:05+00:00

I know the question has been posted before, not answered thoroughly though. Also I

  • 0

I know the question has been posted before, not answered thoroughly though. Also I think it still depends on the problem parameters. Lets say you have a SaaS service with a lot of customers but with relatively small amount of data per customer, it probably makes sense to have a single database.

What happens in the case where your customers will longterm be not in the range of thousands (eg. 100 in a very good scenario) and start with 5 – 6 but you have lots of data per customer this time (eg. a business intelligence service which aggregates and processes tons of data). To give you a hint, 25 – 50GB of data to process (analytics and other stuff) per customer initially, as a start and then add about 10GB per year per customer.

If you go down the path of a single db, then you tag the data to a customer with a specific field (indexed of course) and then rely on a replication and sharding system which is pretty straightforward thanks to mongo. I assume ( haven’t tested and if you have such case please share some insight) that in a sharded collection against indexed fields query lookup time should be fast.
However let’s say you add another customer now, another 50 GBs (spread accross 8 – 10 collections, hence many millions of items / collection). You either have to:
1) drop indexes and rebuild them ( i guess thats the worst because system becomes practically unusable)
2) dont drop and insert with indexes (it will take forever), system will be responsive
3) I would think in a replica set take down a node, drop indexes, update with new customer, bring back indexes and then have it join the replica set so that they can begin syncing.

In the other hand, if you have one db per customer, adding or removing can be done relatively quickly because the system practically isolates its customer, rows are in still in the range of many millions but not close to billion, which is good and lookup times are obviously fast. Whatever your doing in this case, it’s much easier and quicker in terms of implementation simply because you will always work with a relatively smaller number than in the case of a single db. However when it comes to maintenance (replication & sharding because you will keep adding more data per customer) it’s going to be a friction for sure
Plus in this case I would probably assume that you have to physically isolate dbs in seperate machines / instances, because of the OS limit of number of open files and of course there would be an extra overhead due to multiple simultaneous connections in multiple dbs.

If I missed something please do shed some light, but I am most interested to hear other opinions on this…

Thanks

  • 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-14T17:10:06+00:00Added an answer on June 14, 2026 at 5:10 pm

    I’d suggest a DB-per-customer if you’re staying in the low hundreds of customers, collection-per-customer if you expect more customers than that. (There is some per-database overhead that you won’t want to incur for thousands of DBs.)

    Note that your idea, “I would think in a replica set take down a node, drop indexes, update with new customer, bring back indexes and then have it join the replica set so that they can begin syncing.” will not work since in a replica set only the primary can take writes.

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

Sidebar

Related Questions

I know that this question has been posted before but I'm still not able
I know this question has been posted before... but I haven't found any answer
I know this question has been posted here before, and I've trawled through as
sorry if a similar question has been posted before, i didn't know what terms
I know this question has been posted on this forum before: How do you
I know this question has been asked a couple of times before. I m
I know this question has been asked before however the answers I found where
I know this question has been asked before, but non of the solutions solve
I know this question has been asked a zillion times, but I still feel
I know this question has been asked before, and I took a look at

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.