In the mean time I’ve a mongo database with three situations one grasp and two slaves.
In the mean time the database is on kubernetes hosted by aws. The utmost cpu cores is four and every so often when I’m operating heavy processing the cpu used for mongo is 100% (four cores).
First I’ve a problem with kubernetes to handle exterior connection utilizing reproduction set as a result of if you find yourself doing a connection to a duplicate set the server response is the interior kubernetes endpoints so the exterior shopper can’t join, I’ve to all the time hook up with the grasp from outdoors if I’m working outdoors the cluster. In the mean time this isn’t actually a problem as I should not have exterior app related, solely debug instruments, however may very well be for later.
Then I have no idea if internet hosting mongodb on kubernetes is an efficient resolution or is it higher to do it exterior, I can’t discovered any finest apply on it.
I do not likely perceive why when I’m doing heavy course of on mongo solely the cpu of the grasp is changing into loopy and the opposite don’t transfer, my connection url is mongodb://username:password@host1,host2,host3/database?replicaSet=rs0&slaveOk=true
However I’ve the impression that solely the grasp is working, when I’m operating rs.standing()
every part appears effective.