0

At the moment I have a mongo database with three instances one master and two slaves.

At the moment the database is on kubernetes hosted by aws. The maximum cpu cores is 4 and from time to time when I am running heavy processing the cpu used for mongo is 100% (4 cores).

First I have an issue with kubernetes to manage external connection using replica set because when you are doing a connection to a replica set the server response is the internal kubernetes endpoints so the external client can not connect, I have to always connect to the master from outside if I am working outside the cluster. At the moment this is not really an issue as I do not have external app connected, only debug tools, but could be for later.

Then I do not know if hosting mongodb on kubernetes is a good solution or is it better to do it external, I can not found any best practice on it.

I do not really understand why when I am doing heavy process on mongo only the cpu of the master is becoming crazy and the other do not move, my connection url is mongodb://username:password@host1,host2,host3/database?replicaSet=rs0&slaveOk=true But I have the impression that only the master is working, when I am running rs.status() everything seems fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.