I have a mongoDB database, with 1 primary and 1 secondary in replicaset(and 1 arbiter). Both the servers are hosted on aws on c4.2xlarge instances(with 1.5 TB of SSD on each). Mongo version of primary server is 3.4.9 and secondary is 3.4.10. This is the only difference between two instances(version diff).
The issue is whenever I start reading from the secondary server(i.e set READ PREDERENCE SECONDARY on my application), MongoDB starts working slow or inefficiently(queues start to increase in rabbitMQ and processes start taking time), and when I make my application to read-and-write both from primary only, it works perfectly.
What can be the issue or possible cause(with the given information)? Has anyone else too has faced the same or similar issue? I know this sounds random, or vague, but I am 100% sure, the issue is with reading from secondary. I will try to get some more logs for the same. But currently I have only this much information only.(And there no lag between two, in any case,whether reading from secondary or not)
Thanks in adavance.