our current problem is how to handle a document when it reaches the maximum size of 20mb. We have multiple docs and per doc, we have irregular data input. So the doc increases when users add new data in our frontend. The problem is now how to handle a doc if it reaches after months or years the limit.
My first idea was to create a doc every month to keep it small and to avoid to get to the limit. The second idea was to check the size of the doc and create a new one if it is just before the limit. The third idea was to create a doc for every entry but we have a table where we show all entries per doc and if we change it to one doc per entry than we have too many queries at this point.
Do you have any idea or are there any best practices in such cases? I searched a lot but can’t find anything.
Thanks in advance!