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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:01:03+00:00 2026-06-12T23:01:03+00:00

What will be the best approach for creating MongDB collection(s) that can be scalable

  • 0

What will be the best approach for creating MongDB collection(s) that can be scalable and have best read performance? Following are the assumption

  • A user has 100 entries /day. Entries are private to user.
  • We may have 200,000 users. So almost 200 * 200,000 = 20M entries a day.
  • User likes to view the entries as soon it is inserted.
  • User likes to search their own entries even data is 3 months old. In 3 months, 20M* 90
    = 180M entries.
  • There are no updates. Only insert and delete.

Option in our mind.

  • Sharding based on user name. A .. D in one shard etc. But still it will be very difficult to scale.
  • Create one collection for each user. We know it is drastic approach but why not. We are not doing aggregation across user data. Any limitation of number of collection in MongoDB

Any suggestion will be appreciated.
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-12T23:01:04+00:00Added an answer on June 12, 2026 at 11:01 pm

    One collection per user will not work, unfortunately, due to the limits on the number of namespaces you can have (24,000).

    I think there are a few good directions to go. You are certainly going to want to use a shard key that distributes uniformly – username would be good. What are your concerns about its scalability?

    You may want to check out TTL (Time to Live) collections, as well as Read preference to let your application read from secondaries. This can speed up query times by distributing workload.

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

Sidebar

Related Questions

What's the best approach to creating a div that will take the full width
I'm creating a UX experience that will allow the user to add items to
What is the best approach to create a nested grids ? //all ideas will
I would like to create a calculated member, (or whatever is best) that will
I will try and word this question the best I can, for it is
I will try and set the scene as best i can. *lights candle What
This will probably be obvious but I can't find the best way. I want
What is the best way to write a function (or something DSLish) that will
What is the best approach for creating a password-less login system? I'm thinking to
I have a requirement to run a query against a database that will return

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.