Hello everyone!
Tell me if there are any caveats to using in-memory storage? as an example for saving maps of black/white lists of ip addresses, for more complex cases of searching in the Radix tree or implementing LRU cache.
That is, I implemented several plugins, writing like a truth Gopher, of course taking into account limitations, but not fully understanding the magic under the hood . These plugins show great results on a local machine in Docker. In the production environment, immediately after loading, all memory is consumed.
Therefore, I want to ask more experienced plugin developers whether it makes sense to use in-memory storage for the examples from the first paragraph?
That is, it is implemented as follows:
- the plugin is initialized by filling the map from structures or ordinary strings
- map is embedded in the corresponding structures that use it
- in case, if the data is not only read, but also written, then I use Mutex