[SOLVED] Redis-oplog deployment with load balancing meteor instances

Hi, I have a Meteor website hosted in Google Cloud. I have multiple Meteor instances works behide a network load balancer.
These 2 Meteor instances use a Mongodb replicaset (3 servers).

Load balancer => Meteor server instances => Mongodb Replicaset

The problem I’m facing right now is the master mongodb node has high CPU loads. I had to decrease the size of oplog to 1024MB, it helps a lot but not enough.
I’m about to install redis servers to get rid of oplog tailing issue. I’ve read the redis document, I’m considering between 2 deployment models:

Does anyone has experiences of redis deployment? what model should I deploy?
Thank you.

ist just installed a single redis and it was enough. the redis oplog seems to not use any data, it just uses the pub-sub-mechanism, so replication of redis is not needed. But the developers of the redis oplog package can give you more insight

1 Like

Yes, you’re right. We don’t store data in redis, we just use Redis to notify changes. Then in the worst case one of servers down, I think the system still works.
But I still want to make sure if one server is down, the whole system still works. I think I will use Cluster 101.

here is my redis.conf updates

Bindip #to only one ip address
maxmemory 256mb
maxmemory-policy allkeys-lru
cluster-enabled yes
cluster-config-file instance2-6379.conf #unique name for each server
cluster-node-timeout 5000
cluster-require-full-coverage no #in case one node die, still work

Then create the cluster:

redis-cli --cluster create 10.140.0.1:6379 10.140.0.2:6379 10.140.0.3:6379

Now I can connect to the cluster

redis-cli -c -u redis://10.140.0.1:6379,10.140.0.2:6379,10.140.0.3:6379

And finally, I found a very important thing: redis-oplog use redis npm package (version 2.8.0) and it DOES NOT support cluster. :joy: