2

Currently, i am writing data into redis which is reduced to mongo every 2 minutes. I am wondering if i can use Mongo Cache instead of redis here. This will save the cost of 2 dbs in production.Also,the mongodb page says :

The WiredTiger cache stores uncompressed data and provides in-memory-like performance

I want to test it but i am not able to find any documentation for playing around with WiredTiger Cache.

Note: Wiredtiger is default mongo storage engine.

Neil Lunn
  • 148,042
  • 36
  • 346
  • 317
Himanshu Gupta
  • 305
  • 3
  • 12
  • I am not sure I understand the question. If you want to tune mongodb behavior have a look at mongodb performance tricks. – amirouche Jun 25 '17 at 20:14

1 Answers1

0

You can run Mongo DB as a replacement for Redis by specifying the In Memory storage engine:

mongod --storageEngine inMemory --dbpath <path>

You can read more about it here.

I may be wrong, but I believe that you will still need to run 2 Mongo DB servers, one running in Wired Tiger for disk storage, and the other running with In Memory storage for your cache service.

AshleyS
  • 2,191
  • 2
  • 20
  • 23
  • I know about the In Memory storage engine. Using it will still mean 2 dbs in production (two storage engines). I am suggesting why can't we use WiredTiger cache instead of another storage engine? – Himanshu Gupta Jul 11 '17 at 04:42