This tag is used mostly for a MongoDB replica set (a group of "mongod" processes that maintain the same data set) and rarely for a Kubernetes ReplicaSet (the next-generation Replication Controller with set-based selector support).
Questions tagged [replicaset]
583 questions
3
votes
3 answers
Why was ReplicaSet introduced in Kubernetes?
I understand the difference between ReplicaSet and ReplicationController, of former being Set based and the latter Equality based. What I want to know is why was a newer implementation (Read ReplicaSet) introduced when the older…

Vinodh Nagarajaiah
- 153
- 1
- 3
- 6
3
votes
0 answers
Sharded mongodb cluster use only one shard
I'm trying to create a sharded mongodb cluster, I have 3 VM to use and I was trying to get the following setup:
VM1) Node.js Application + mongos instance
VM2) CSRS PRIMARY + Shard
VM3) CSRS SECONDARY + Shard
I'm not interested in replication but…

daniele piscaglia
- 73
- 6
3
votes
0 answers
MongoDb replication lag increasing and drop collection command
We are experiencing a strange behaviour in a production environment related to mongodb replica set and replication lag.
Basically we have an installation with a mongodb replica set and an application which writes to the primary node of the replica…

Enrico Massone
- 6,464
- 1
- 28
- 56
3
votes
1 answer
Should I use hostname or IP address for mongodb connection string
I've set up a MongoDB replica set with 3 nodes. All servers live in the same VPC, but in different availability zones. Thanks to etc/hosts file, in while I describe where to find the other nodes, my replica set is able to communicate between nodes.…

Laurent Rivard
- 509
- 4
- 13
3
votes
1 answer
MongoEngine specify read preference on query
I am using Mongo 2.6, Pymongo 2.7.2 and Mongoengine 0.8.7. For a particular read query, I want to use the secondary of my replica set. Hence, as specified in the mongoengine documentation here I wrote my query as follows :
from…

Yahya
- 520
- 2
- 10
- 26
3
votes
1 answer
mongodb shard replication member: could not find member to sync from
I am trying to set up mongodb that have shards with replica set and I enabled --rest so I can view my shards on my browser however, when I view "replSetGetStatus" it shows "could not find member to sync from" image of my replica members on my…

Ronald-SD
- 31
- 1
- 2
3
votes
2 answers
How to start a replica set without using localhost?
I'm trying to initialize a replica set with 3 nodes. While executing rs.initiate() I got the following error: "No host described in new configuration 1 for replica set ##### maps to this node"
If I try to set the first member to "localhost:27017"…

Josh Elias
- 3,250
- 7
- 42
- 73
3
votes
1 answer
How can I create a MongoDB cluster using multiple/three nodes/servers/machines using a single shell script?
How Can I up the 3 config server from a single remote/local terminal ?
How Can I up the shard servers ?
How can add multiple machines to the shard cluster ?
How to create the replica sets in the multi node cluster?

Vikas Kukreti
- 319
- 8
- 16
3
votes
1 answer
Why does my MongoDB database URI listed on Heroku have a replica set option, while the one listed on MongoLab does not?
I setup a MongoDB database on MongoLab through Heroku. I selected the free, single-node, sandbox plan, not any of the replica set clusters.
The page for my database on MongoLab shows the following URI to connect to the database:…

Jackmc1047
- 391
- 2
- 5
- 12
3
votes
1 answer
mongodb sharding user authentication
I've set up a brand new, sharded MongoDb (3 config servers, 3 node replica set). Followed the documentation online, really didn't have any problems. Sharded a database and a collection; mongos connects to the system; it's all working fine.
The one…

rycel
- 51
- 1
- 5
3
votes
0 answers
How can I tell what readPreference MongoDB queries hitting my database are using?
I have a MongoDB 2.4 replica set and have a node.js application that is coded to use readPreference: 'secondaryPreferred' in most--but not all--situations.
I'd like to verify on the server that the read preferences are as intended for various…

Aaron Silverman
- 22,070
- 21
- 83
- 103
2
votes
2 answers
How does mongo replica set elections behave when some nodes are dead?
Let’s say I have 5 nodes replica set.
3 of them are dead, 2 alive.
How would the majority will be calculated? 5 nodes majority would be 5/2+1=3 but if 3 nodes are dead, will it still look for 3 votes? There are only 2 alive so only 2 votes… or the…

Noam Guy
- 33
- 4
2
votes
0 answers
Would like to downscale deployment replicas to 1
Currently, the deployment replicas are set as 2. I'm trying to scale down deployments to 1 using the below command
kubectl scale deploy -n myspace --replicas=1 --all
it terminates but spins back to 2. How can I scale down?

Sumitha Nirmal
- 21
- 2
2
votes
0 answers
MongoDB single node replicaset never finishing instanciating Error: "Cannot use non-local read concern until replica set is finished initializing"
I'm trying to setup a mongodb replicaset as a single node in a docker container because I need to use the transactions to watch over changes in collections.
The issue I'm having is that the replicaset seems to never finish to instanciate and the…

Junn Sorran
- 317
- 2
- 4
- 12
2
votes
1 answer
MongoDB ReplicaSet in K8S -- can't connect via port forward
I have a k8s dev cluster (in aks). I previously used the bitnami chart for deployment of a single MongoDB pod and I never had the following problem.
As I'm now using a feature that only works with replicaSets, I recently moved to using the…

Software Engineer
- 15,457
- 7
- 74
- 102