I was following this article
https://docs.mongodb.com/manual/core/inmemory/ I would like to build a replicate set of in memory storage with 2 in memory and 1 wired tiger storage.
Hi Sachin,
Make sure that you configure the replica set member with WiredTiger storage engine as a hidden member as instructed in the manual. This is to ensure only the in-memory members can become the primary.
I had a question that somewhere it is mentioned that in memory is part of enterprise edition only and not part of community release. Is this true?
As of MongoDB v3.4, that's correct. The In-Memory storage engine is available only in MongoDB Enterprise. If you are evaluating MongoDB Enterprise and interested, feel free to send me your contact details and I can request a MongoDB Account Executive to reach out to you.
If my collection size is greater than the available RAM that I can allocate to in memory database, is it possible to use in memory storage engine?
The In-Memory storage engine requires all of its data (including indexes, replica set oplog) to fit into the specified —inMemorySizeGB command-line option or storage.inMemory.engineConfig.inMemorySizeGB setting in the YAML configuration file. By default, the in-memory storage engine uses 50% of physical RAM minus 1 GB.
Also what happens say when you started using this storage engine size was less than allocated RAM and then over the time it increase beyond this limit.
If a write operation would cause the data to exceed the specified memory size, it will throw an error:
"WT_CACHE_FULL: operation would overflow cache"
Depending on your use case, you can utilise Capped Collections to limit the size of collection. Capped collections work in a way similar to circular buffers: once a collection fills its allocated space, it makes room for new documents by overwriting the oldest documents in the collection.
Regards,
Wan.