For your needs, it is recommended to add another collection and use userId for association, although mongodb gives priority to inline processing. Since analyzing your activities is used to create a user activity timeline, it is basically something every user should have. In addition, according to your description, activities will put a lot of things. Although MongoDB currently expands the size of a single document to 16M, if the content is too large, it will still exceed its limit, and it will also have a certain impact on queries, etc. For this situation, mongodb will also recommend making redundant connections to simulate SQL connection queries.
For your needs, it is recommended to add another collection and use userId for association, although mongodb gives priority to inline processing. Since analyzing your activities is used to create a user activity timeline, it is basically something every user should have. In addition, according to your description, activities will put a lot of things. Although MongoDB currently expands the size of a single document to 16M, if the content is too large, it will still exceed its limit, and it will also have a certain impact on queries, etc. For this situation, mongodb will also recommend making redundant connections to simulate SQL connection queries.