Varnish is a carefully tuned piece of machinery that consciously leverages the page cache because that happens to be a great fit for the access pattern that you'd expect in a cache.
Mongo is not a cache. It generates quite a different access pattern and it's widely documented what happens when your working-set exceeds RAM or when you put it under anything but the lightest write-load. A single bulk update literally halts the world.
Comparing Varnish to MongoDB is quite an insult, akin to comparing a Swiss precision Rolex to a plastic Mickey Mouse watch "with many advanced secret-agent features" from a gumball machine.
Varnish is a carefully tuned piece of machinery that consciously leverages the page cache because that happens to be a great fit for the access pattern that you'd expect in a cache.
Mongo is not a cache. It generates quite a different access pattern and it's widely documented what happens when your working-set exceeds RAM or when you put it under anything but the lightest write-load. A single bulk update literally halts the world.
Comparing Varnish to MongoDB is quite an insult, akin to comparing a Swiss precision Rolex to a plastic Mickey Mouse watch "with many advanced secret-agent features" from a gumball machine.