Answer the question
In order to leave comments, you need to log in
Where to store the content - in Mongo or the file system?
Good evening. The question may seem naive, but I want to understand and confirm the conclusion with some facts.
In terms of load and performance, where would it be better to store content for sites that receive it via API - in a JSON file or in Monge? How to compare load?
In theory, you don't need to read a lot of resources in a file. Maybe it can be somehow loaded into the process memory somehow? Because if the file is accessed every time, then this is a big load on the file system. The JSON file, by the way, is distributed by my server on the Node, if it matters.
At the same time, Monga may have some kind of optimization of this process, it is not for nothing that such things exist at all.
Answer the question
In order to leave comments, you need to log in
From a DB - it is more convenient.
From the file system - wildly fast.
If the load is small, if there are enough resources - take it from the database.
If there are problems with the load - take it from the file.
On disks in files, if there is not enough space, it will be possible to connect the disk and get out through the symlink.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question