I am only planning to keep 7 to 10 days in the array so it’s not going to infinitely scale, however each day can be up to 300kb, so that would make total document size of about 1-3mb.
So I just wanted to know if its a good practice to keep all this information in single document or would it be better to put each day in a subcollection?
I really wanted to know this, so hopefully someone helps me.
The anti-patterns series in particular talks about some of the performance consequences of large documents. Large documents will occupy more RAM and may use more network bandwidth if you are retrieving unused fields in your queries.
For example, updating a single field in a 3MB document will require fetching the whole document into server memory to apply the update. This may be fine if all of the fields in the document are commonly used and updated with similar frequency, but smaller documents could be more efficient.
If your most frequent queries are for documents that contain much more information than you need for that query, consider restructuring your schema with smaller documents using references to additional collections. By breaking up your data into more collections and using smaller documents for frequently accessed data, you reduce the overall size of the working set and improve performance.