D
D
Dima Sokolov2019-04-12 07:33:18
MongoDB
Dima Sokolov, 2019-04-12 07:33:18

Data structure organization in MongoDB?

JSON requests will be written to the database (~ 150 times/second per user, approximately 100-300 MB).
If you make a separate collection for each session, and each request is a separate document, then the number of collections may not be enough and you cannot group sessions.
If you store all session requests in one document, then the size of the document will not be enough.
In the current implementation, each session is saved to a separate CSV file.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-04-12
@Zarom

I propose so. You have two entities - session and request. These are 2 different document collections, where each "request" document refers to a parent "session". Example from documentation https://docs.mongodb.com/manual/tutorial/model-tre...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question