Hi,
I have some questions regarding the best practice of mongo Primary-Secondary-Arbiter.
Right now, i use mongo PSA in my graylog production stage.
10.0.0.1 = mongo-1 (Primary)
10.0.0.2 = mongo-2 (Secondary)
10.0.0.3 = mongo-3 (Arbiter)
root@production-mongo-1:/etc# mongod --version
db version v4.0.27
git version: d47b151b55f286546e7c7c98888ae0577856ca20
Graylog 3.2.4+a407287, codename Ethereal Elk
My config in graylog server.conf:
mongodb_uri = mongodb://10.0.0.1:27017,10.0.0.2:27017/graylog?replicaSet=graylog2
Now, i have plan to add more CPU and Memory of mongo-1 (Primary)
. I need to shutdown the VM mongo-1
.
According to this Mongo docs, i need to do mongod --shutdown
to shutdown gracefully the mongo server.
However, if i shutdown the mongo-1
(Primary);
- what happen to graylog master and slave if the
mongo-1
shutdown-ed ? - is it ok for graylog master and slave when
mongo-2
(Secondary) promoted to be (Primary) ? - will
mongo-2
be promoted from Secondary to Primary automatically ? or must be set manually ? - or,
mongo-3
as Arbiter will promote it automatically and the data sync automatically ? - After,
mongo-1
upgraded and started on. ismongo-1
promoted back as primary ?
I am not mongo user, sorry if my question is too dumb. Reading replica set docs, but still suffering to understand behaviour for Graylog
I want to test in staging mongo server, but sometimes i really know first from your pov. Because my test Graylog is like Production needs. Cannot taken down even a minute
If you have any steps or personal docs to maintain mongo
server, i am so glad to read it. Really want to deep learning for this mongo
stuff.
Thank you so much for your time and help.