replica set in kubernetes. High Availability: Deploying Redis on Kubernetes ensures higher availability by utilizing replica sets and persistent storage. replica set in kubernetes

 
High Availability: Deploying Redis on Kubernetes ensures higher availability by utilizing replica sets and persistent storagereplica set in kubernetes  When we do deployment, replicaSet adds pod-template-hash label to pods

Pod Replica Count. 3. For example, if a web application requires at least. Authentication can be enabled using the parameter auth. - Attached the 3 pods at startup in a replicaset - Exposed the services using K8s Services. To deploy mongo helm release use the command given below: $ sudo kubectl apply -f <mongodb-helm-release-name>. The key to the replica set is the commands on runtime in the arg key field. ReplicaSet 的名称必须是一个合法的 DNS. Configure Certificate Rotation for the Kubelet; Manage TLS. 0. Kubernetes has a concept of "probes": readiness probe to make sure that the pod is up-and-running, liveness probe to make sure that the pod is still going well. replication_controller. Kubernetes has become the de-facto orchestration tool and initially it was supporting stateless applications, but stateful (data-driven) applications are very common and are critical to almost all the businesses. The service name in the stateful set matches the name of the headless serice, the statefulset itself works as expected and nslookup as well as kubectl describe svc/mongodb-headless -n mongo produce correct hostname to IP address mapping. It is the fundamental unit of a Kubernetes Cluster. Test the connection to the replica set. A ReplicaSet is a Kubernetes resource used to maintain a specified number of identical pod replicas within a cluster. g. Kubernetes uses the horizontal pod autoscaler (HPA) to monitor the resource demand and automatically scale the number of pods. So, we will be using the following command: kubectl exec -it mongodb-0 -- mongo. 4. ReplicaSetの目的は、どのような時でも安定したレプリカPodのセットを維持することです。これは、理想的なレプリカ数のPodが利用可能であることを保証するものとして使用されます。 ReplicaSetがどのように動くか ReplicaSetは、ReplicaSetが対象とするPodをどう特定するかを示すためのセレクターや. Deployment is recommended for application services. Administrar la federación de clústeres; Networking. When you increase the replica count, Kubernetes will start new pods to scale up your service. Officially, there is no limit to how high this can be set but, of course, you. Ensure that you add s for each Kubernetes pod that hosts a member of your replica set to the certificate. Kubernetes Scale Down Replica set. g environment in (production, qa) or tier notin (frontend, backend)) as opposed to “equality-based”(e. kubectl scale rs/new-replica-set --replicas=0. A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. Connect to mongodb replicaset in kubernetes with external access enabled. Kubermatic named in Gartner® Cool Vendors. In Kubernetes, the place where your application runs is called a pod. So I don't think reason 1 is applicable. Writing a ReplicaSet manifest. Mount storage volumes to a separate VM. The number of pods should follow this. Also Read: A Complete Guide to Kubernetes Secrets. This tutorial will teach you how to deploy MongoDB on Kubernetes. Deployment creates a management object one level higher than a replica set, and enables you to deploy and manage updates for pods in a cluster. I've tried multiple updates since and nothing changed. In this Kubernetes Tutorial we did a comparison between Replication Controller and Replica Set. e. A replica set is a lower-level abstraction that provides basic scaling mechanisms for pods. Edit the controllers configuration by using kubectl edit rs ReplicaSet_name and change the replicas count up or down as you desire. available: Total number of available pods (ready for at least minReadySeconds) targeted by this replication. replicaset should spin up new pods with new image. 0. 1. Scaling a number of replicas in Kubernetes. External hostnames should match the DNS names of Kubernetes worker nodes. If your Kubernetes cluster uses etcd as its backing store, make sure you have a back up plan for the data. 9, and I realised this issue is already fixed, though only if you move to the newer resource types. You should now have a running replica set. A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. It is used to make sure that we have a specified number of pod replicas that are always up and running. Replica sets provide redundancy and high availability and are the basis for all production deployments. The configuration of the third replica set member follows the same pattern and the following figure shows the complete replica set: **Figure 3:** Full Replica Set member configured as a Kubernetes Service. Logging Stack on Kubernetes to learn how to set up a logging stack with Elasticsearch, Fluentd, and Kibana. But an RS ( ReplicaSet) set-based label selector like “in, notin, exist”. Every time when we create a kubernetes object like Deployments, replica-sets, statefulsets. By default, MongoDB 4. cluster. Secondary members replicate this log and apply the operations to their data sets. I wrote a detailed step-by-step tutorial here using more up to date methods. The replicas of a deployment are managed by the replication controller through the replica set. As such, it is often used to guarantee the availability of a specified number of identical Pods. Each of these sets is what’s called a Kubernetes object. 2 image is utilized. kubectl describe deployment deployment-name and. Course Catalog. War diese Seite hilfreich? Ja Nein. Connect to mongodb replicaset in kubernetes with external access enabled. To scale down the pods under we can use same scale command but here we have to reduce the number of replicas. StatefulSets. This way the deployment will be marked as paused and won't be reconciled by the controller. A complete discussion of updates is out of scope for this article -- we'll cover it in the future -- but couple of interesting things here: The StrategyType is RollingUpdate. Mongodb 6 How To Deploy A Mongodb Replicaset Youtube The process of configuring a mongodb replica set on gke using kubernetes is a simple and uncomplicated one, comprising a handful of steps. Step2: Check the Context is set to your newly created cluster. This will make the old replica set get drained before the new one is started. In a nutshell, you run a sidecar app to configure the replica set for you, and either use a service per instance or ping the K8s API for the pod IP addresses. ReplicaSets are generally considered a “bridge” to deployments – the use of which is generally considered a best practice when using Kubernetes. Now I set replicas to 2 in deployment. Kubernetes offers a DNS cluster addon Service that automatically assigns dns names to other Services. Port forward to access mongo on local: 3 Answers. 1 <none> 443/TCP 9d NAME READY UP-TO-DATE AVAILABLE AGE deployment. 0. No host described in new configuration 1 for replica set my-mongo-set maps to this node. This means that if any pod dies, it is immediately noticeable. I highly recommend reading it all. To begin with, create an Express app first. apps/app-1 created. The guide includes steps to run a standalone MongoDB instance and a replica set. As you can see, rather than listing the individual pods, Kubernetes shows us the Replica Set. You can use: kubectl get hpa -A -w. So we tell Kubernetes, “I would like a replica set named web, which should have 3 pods, all matching the following specification. Step5: List all the deployments. Maintain coherent infrastructure, where databases and applications run on the same platform. These deployments are useful for working with a large amount of data and high loads. ReplicaSets work to maintain the desired state of a set of identical pods, ensuring that if the actual state deviates from the desired state (due to failures or scaling needs), the ReplicaSet takes appropriate actions to bring the system back to the desired state. I've tried. replication controller. Step1: Creating a GKE Cluster with 3 nodes. ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time and it checks how many pods need to maintain bases on which it creates or deletes the pods. Restore snapshot files. ¶. This page shows how to run a replicated stateful application using a StatefulSet. io/mongo:4. ReplicaSets allow us to use “set-based” label selector (e. Both of them ensure that a specified number of pod replicas are running at any given time. 3: Initiate the replica set. MySQL settings remain on insecure defaults to. A Replica Set allows you to define the number of pods that need to be running at all times and this number could be “1”. As with all other Kubernetes config, a DaemonSet needs apiVersion, kind, and metadata fields. He is also a published author and a frequent speaker at international conferences, discussing Java, Kubernetes, Quarkus, Microservices, Cloud Computing, and DevOps. mongodb-1 – Read-only replica. A deployment is a higher-level object in Kubernetes that is responsible for managing a set of replica pods. As such, it is often used to guarantee the availability of a specified number of identical Pods. Selectors use labels to filter/select objects . kubernetes. WEKA. In the YAML file, we’ve set the value of spec. In Kubernetes, a ReplicaSet is responsible for maintaining the desired number of replicas of a pod to ensure high availability and load balancing in handling traffic. Main Challenges. 7. La version de l'API apps/v1beta2 est obsolète. matchLabels field and. kubectl - Retrieving the current/"new" replicaset for a deployment in json format. In this Kubernetes Tutorial we did a comparison between Replication Controller and Replica Set. ) Without RS, we will have to create multiple manifests for the number of pods we. Note that even if running the configuration shown in Figure 3 on a Kubernetes cluster of three or more nodes, Kubernetes may (and often. 1. To scale up, edit the manifest file and change the replicas value from 2 to 5. Check to see whether the kube-controller-manager is running or crashing or logging errors. The rollout restart command is used to restart a deployment or a replica set in Kubernetes. Kubectl run - doesn't create replicaset. この記事は Kubernetes道場 Advent Calendar 2018 8日目の記事です。. To check your version of Kubernetes, run kubectl version. Meaning you can create a Replica set containing only one Pod specifying to run only one instance of that. We have explained all the MongoDB Kubernetes YAML files. The selector is used to identifying the Pods it can acquire. “In this configuration the failover process generally completes within a minute. Add a comment. Try kind: Deployment. These correspond to the three nodes in your MongoDB replica set. You can think as with an RC → app=newsproducer,. One exception is the rolling-update command. You can update image from v1 to v2. Behavior. EDIT: Actually, this didn't fix the entire problem. In order to make this work, you need to include. Install suggested plugins - to install the recommended set. kubectl delete -f . Scales down all deployments in a whole namespace: kubectl get deploy -n <namespace> -o name | xargs -I % kubectl scale % --replicas=0 -n <namespace>. To check whether the stateful set is created or not use the command given below:Saving this config into hpa-rs. What is a ReplicaSet in Kubernetes? ReplicaSet is the next-generation Replication Controller. A deployment can be updated, rolled out, or rolled back. yaml’, and we will be. replica_set. It's a cheap solution but it's not that big an issue either. Kubernetes Operations & Troubleshooting with Komodor. Rolling updates allow Deployments' update to take place with zero downtime by incrementally updating Pods instances with new ones. However, the distinction isn’t very important as many replicas eventually become pods. Like a Deployment, a StatefulSet manages Pods that are based on an identical container spec. If you are unsure about whether. A ReplicaSet is defined with fields, including a selector that specifies how to identify Pods it can acquire, a numberof replicas indicating how many Pods it should be maintaining, and a pod template specifying the data of. DNS. このリソースは直接使用することは少ないが、次に出てくるDeploymentを抑える上で理解が進むのでやってい. If you want the rolling update functionality please consider using Deployments instead. To me that because compass use the topology that replica set use. 3. After you deploy MongoDB on kubernetes, to clean up the deployment objects, execute the following. yaml # or another way of writing "kubectl scale --replica=10 replicaset <replicaset name as provided in metadata>" kubectl scale --replica=10 replicaset myapp-rs. Let’s explore both the procedure step by step. 2. One of the controllers in. 0 and Spotify maven Docker plugin. The functionality of both Replica Controller and Replica Set are quite the same - they are responsible to make sure that X number of pods with label that is equal to there label selector will be scheduled to different nodes on the cluster. Statefulsets is used for Stateful applications, each replica of. Kubernetes - Replica Sets. ReplicaSet then fulfills its purpose by creating and deleting Pods as needed to reach the desired number. I am learning concepts in kubernetes, when i am going through deployments and replicaset concepts i got one doubt that can replicasets and deployment be independent to each other. Now, a lot of support is available for running stateful applications with Kubernetes. The deployment did not create a new replica set with the updated container image. Kubernetes synergizes with MongoDB to create highly scalable and portable database deployments. Understanding the Scenario. It manages the deployment and scaling of a set of Pods, and provides guarantee about the ordering and uniqueness of these Pods. ‘Kubectl top’ is a straightforward command-line tool that empowers…When you deploy your sharded cluster via the Kubernetes Operator, you must choose whether to encrypt connections using TLS certificates. For example, kubectl scale –replicas=2 rs/web. sharma@knoldus. Let’s create a replicaset to understand this. 1. replicaSetHorizons setting are correct. Replicaset is one of the Kubernetes controllers. Figure 1: Three-node MongoDB replica set Important : The documentation states the following. Deployments create a new replica set whenever you do an update to the deployment. 1. หลังจากเรารู้จัก POD กันไปแล้วต่อมาเรามารู้จัก ReplicaSet กัน บทนี้เราจะมาทำความเข้าใจเกี่ยวกับ ReplicaSet ว่าคืออะไร ต่าง. Each Node is managed by the Master. io/name: hello ). Replica Set ensures how many replica of pod should be running. Before you begin StatefulSets are only available in Kubernetes version 1. mongodb-2 – Read-only replica. Summary of what we learned: ReplicationControllers always keep the desired number of pod replicas running. NAME READY STATUS RESTARTS AGE guestbook-redis-replica-2q2yf 1/1 Running 0 3m guestbook-redis-replica-qgazl 1/1 Running 0 3m Updating labels. A replica set is a core Kubernetes object called ReplicaSet. N-1}. A big advantage of Kubernetes and StatefulSets is that you can scale the number of MongoDB Replicas up and down with a single command! To scale up the number of replica set members from 3 to 5, run this command: kubectl scale --replicas=5 statefulset mongo In a few minutes, there will be 5. " Oracle Discussion, Exam 1z0-1072-20 topic 1 question 11 discussion. A Pod always runs on a Node. Establishes TLS -encrypted connections between client applications and MongoDB. More specifically, they’re called Kubernetes controllers. It's available with Kubernetes v1. yaml. These commands are named to enable users unfamiliar with Kubernetes objects to perform updates without knowing the specific fields that must be set: scale: Horizontally scale a controller to add or remove Pods by updating the replica count of the controller. For ReplicaSets, the kind is always just ReplicaSet. See how they work together and how to use them with other resources such as ConfigMaps, Secrets, Volumes and Services. What is Kubernetes Replicaset. Using a custom Docker Image and Deployments. If not: to change this, add . 0. of pods running. The ReplicaSet configuration defines a number of identical pods required, and if a pod is evicted or fails, creates more pods to compensate for the loss. A deployment is an object in Kubernetes that lets you manage a set of identical pods. ช่วงนี้หลายๆ คนอาจจะได้ยินชื่อ Kubernetes บ่อยๆ ว่าเป็น tools ที่. Automating MongoDB Replica set configuration on Kubernetes. The next part in the manifest is the selector field. It creates and replaces pods as necessary. Expose the MongoDB replica set to the internet by creating Load Balancer service. I prefer to use different ip’s and keep 27017 as the port. a number of replicas indicating how many Pods it should be maintaining. Comme avec tous les autres objets API Kubernetes, un ReplicaSet a besoin des champs apiVersion, kind et metadata . print (k8s. In Member Configuration, modify the settings for the replica set member that you want to edit. ReplicationController will maintain the pod lifecycle by making sure that the desired is matching with no. · Aug 23, 2023 · 11 min read · Tutorials Contents Kubernetes Replicasets How Does a ReplicaSet Work? How to Create ReplicaSets in Kubernetes? How to Scale a. Kubernetes resource. Imperative config management with commands. In this example, the following rules apply: The node must have a label with the key topology. The problem is that all replicas go together. Running MongoDB in Kubernetes is becoming the norm. Tutorial by: Cloud Native Computing Foundation Length: Long Can help you learn: Kubernetes basics, its architecture, and the problems it helps solves, model of Kubernetes for handling deployments and containerization, Kubernetes concepts like namespaces, replica sets, and deployments. 9. This guide will help you create a Kubernetes cluster with 1 Master and 2 Nodes on AWS Ubuntu 18. 1. 10. 1. desired: Number of desired pods: gauge: kubernetes. 9, la version de l'API apps/v1 pour le type ReplicaSet est la version actuelle et activée par défaut. A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. Deploy Mongodb on kubernetes in replicaset Mode. Kubernetes ReplicaSets are a way of ensuring that a specified number of replicas (i. After going through the contents, now you’ll be familiar with the concept of ReplicationControllers and ReplicaSets and various commands associated with them in kubernetes. Replica Set use Set-Based selectors while replication controllers use Equity. in case have 10 nodes and I use the podAntiAffinity: with the topologyKey and one app with 5 replica, each instance of the 5 pods will be scheduled in different node as each node have diffrent kubernetes. Before a scaling operation is applied to a Pod,. Replica set. In this post, we discuss the three forms of Kubernetes capacity autoscaling. Conditions: Type Status Reason ---- ----- ----- ReplicaFailure True FailedCreate Events: <none> All of the troubleshooting guides I've. And the -w argument is for watch so you have a refreshed interface that gives you infos on your hpa ressources. Let’s suppose application get crashed and pod fails, users are no longer to access an…So Kubernetes should know that they're up and running property. 当控制平面为 ReplicaSet 创建新的 Pod 时,ReplicaSet 的 . kubectl create -f hpa-rs . --all is used to delete every object of that resource type instead of specifying it using its name or label. To learn more about replica sets, see the Replication Introduction in the MongoDB manual. Old Replica set are removed. More precisely, a Deployment creates a ReplicaSet which then creates a set of identical, steteless, pods, w. t the usage of selectors to replicate pods. Xin chào các bạn, chúng ta lại tiếp tục với series k8s basic để cùng nhau làm quen với k8s. This is where replicasets come into play. Statefulset for mongodb with replica set. Replica Set. ymlAlternatively, you can also specify the replica set name and the ip addresses in a configuration file: replication: replSetName: "rs0". Longhorn implements distributed block storage using containers and microservices. updateStrategy. First sentence in the documentation: "The Horizontal Pod Autoscaler automatically scales the number of Pods in a replication controller, deployment, replica set or stateful set". As such, it is often used to guarantee the availability of a specified. Các nội dung trước chúng ta đã đi qua: Trong bài hôm nay chúng ta sẽ làm quen và thao tác với Kubernetes Deployment và ReplicaSet. This is where PDB s provide the added advantage over the Replicaset. Follow asked Jun 3, 2019 at 11:11. Source: kubernetes. What are ReplicaSets used for? ReplicaSet is used to deploy. default. Using the first method, you can edit the configuration file we created earlier in this exercise by changing the replicas property value to a higher number to scale up or a lower number to scale down. Normal ScalingReplicaSet Scaled up replica set nginx-deployment-2035384211 to 3 22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx. The isMaster command will return the list of member hostname:port in the replica set, as entered in the. This tutorial will teach you how to deploy MongoDB on Kubernetes. io/name: hello ). For example, for a member of a replica set deployed on a Pod with the name rs-mongos-0-0, in the Kubernetes Operator service named mongo-0 that is created in the default mongodb namespace, the FQDN is:Wait for the MongoDB Replica Set to be fully deployed. Kubernetes will automatically create a new pod to replace the one you just deleted. The following diagram shows an example of scaling:This article contains best practices and guidance for running SQL Server containers on Kubernetes with StatefulSets. Either Main or Replica can run outside of Kubernetes, be regular MongoDB and be out of the Operators’ control. Use kubectl directly. Wenn Sie eine spezifische, beantwortbare Frage zur Verwendung von Kubernetes haben, stellen Sie diese unter Stack Overflow. Greatful for any help , pointers for the same… I have created a mongodb replicaset using the following method. Kubernetes deployments manage stateless services running on your cluster (as opposed to for example StatefulSets which manage stateful services). Edit the running deployment and update revisionHistoryLimit field and set to zero as revisionHistoryLimit: 0 $ kubectl edit deployments. From my understanding this means that MongoDB cannot connect to the given member. kubectl create --help |awk '/Available Commands:/,/^$/' Available Commands: clusterrole Create a cluster role clusterrolebinding Create a cluster role binding for a particular cluster role configmap Create a config map. You should get just 1 deployment. 3. exit the editor. To make changes in your current deployment you can use kubectl rollout pause deployment/YOUR_DEPLOYMENT. - Created mongo instance in 3 pods. As it goes from Kubernetes docs. Kubernetes — Replica Sets Replica Set ensures how many replicas of the pod should be running. The Replication Controller is the original form of replication in Kubernetes. kubectl scale --replicas=10 -f rs-creation. Step7: ScaleUP the deployment. You'll need a secret for your mongodb key if you don't have one already: sh generate-secret. I have enabled external access with SVC type LoadBalancer. global. And use standard connection string like you are in kubernetes :I have a mongo db replicaset running on kubernetes cluster ( on AWS EKS ) , say cluster-1. Usually, you define a Deployment and let that Deployment manage ReplicaSets automatically. A DaemonSet also needs a . ReplicaSet is a Kubernetes object that maintains the stability of Pods, it guarantees the availability of Pods depending on the replica number provided by a config file. A ReplicaSet is a Kubernetes object that ensures that a specified number of replicas of a pod are running at any given time. initiate (). Improve this answer. 10 <none> 53/UDP,53/TCP 8m. . If any Pod dies, then the controller will re-create a new one by watching the Pod status. What we will do. MySQL settings remain on insecure defaults to keep the focus on general patterns for running stateful. yaml. Using Community Kubernetes Operator. me@pooh ~ > kubectl get pods,services NAME READY STATUS RESTARTS AGE pod/kubernetes-bootcamp-5c69669756-lzft5 1/1 Running 0 43s pod/kubernetes-bootcamp-5c69669756-n947m 1/1 Running 0 43s pod/kubernetes-bootcamp-5c69669756-s2jhl 1/1 Running 0. This will provide you with the status of your replica set, including the list of members. This answer is out of date. Configure Certificate Rotation for the Kubelet; Manage TLS. replace the <namespace-name> with the namespace name in which you want to deploy MongoDB. When you increase the replica count, to scale up your service. >> Search Courses; Adobe & Design. Kubernetes Operator provides an interface to manage third-party applications just like Kubernetes-native objects. One of the easiest and most preferred methods for scaling is to update this value. Notice that the name of the Replica Set is the Deployment name and a hash value. Danke für die Rückmeldung. The Replication Controller uses equality-based selectors to manage the pods. We can create an Administrator for any single Pod among N-replicas. For example, the following command overrides the pilot. OwnerReferences[0]. During a rolling update, Kubernetes creates a new replica set with the updated image while gradually scaling down the old replica set. 1. Deployment allows us to easily keep a group of identical pods running with a common configuration. The operator does not provide a standalone mode, but you can run a replica set with a single node. How do you set-up Mongo replica set on Kubernetes? 2 Unable to create Mongo Replication Set in Kubernetes. This enables the Kubernetes Operator to react to changes that you make to the ConfigMap or the secret. The pod shell replaces the main shell: 4. The following procedure for TLS-Encrypted connections: Establishes TLS -encrypted connections between cluster shards. 0. Replication controller is kinda imperative, but replica sets try to be as declarative as possible. Each pod in a StatefulSet backed by a Headless Service will have a stable DNS name. In the following three-member replica set, the primary accepts all. The challenge I am having is that, I want to be able to loop through all the deployments and save their name and number of replicas so I scale them back to the original after scaling down. Conclusion. Share. The second way is to run the kubectl scale command: Copy. I have deployment and a replica set in Kubernetes that are failing to create a pod. Use a SOCKS5 Proxy to Access the Kubernetes API; Set up Konnectivity service; TLS. 11. The difference between a replica set and a replication controller is that a replica set supports set-based selector requirements whereas a replication controller only supports equality-based selector requirements. kubectl replace -f rs-creation. I have written a bash script to get all deployments on a kubernetes cluster. Replication Controller . 对于 ReplicaSet 而言,其 kind 始终是 ReplicaSet。. For general information about working with config files, see running stateless applications and object management using kubectl. net: bindIp: localhost,<hostname (s)|ip address (es)>. Mar 1. Running Mongodb As A Microservice With Docker And Kubernetes Andrew Instructions the steps to create a docker cluster are as follows. It is responsible for monitoring the health of the. Before running the rs. So, this looks enough for a replicaSet to check if enough pods are running. Rolling index builds take at most one. A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. Replica Set ensures how many replica of pod should be running. When you deploy multiple replica sets using this method, you must make sure they each have a unique value for scramCredentialsSecretName. 3. getenv ("MY_REPLICASET")) and have a result like: [frontend-b2zdv,frontend-vcmts,frontend-wtsmm] that is the pod names of all the container's replicas (also the current container of course) and eventually compare the current name in the name list to get my index in the list. updateSecrets. These can be any nodes in the Kubernetes cluster. Usually, you define a Deployment and let that Deployment manage ReplicaSets automatically. 2. – Sahadat Hossain. //Successfull and working fine internally mongodb://db-mongodb-0. Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications. Here, I’m scaling down the ReplicaSet used in the article’s example to manage two pods instead of four. Let's have a look at an example: 1/16. In order to get this to work, you will need to have the mongod nodes isMaster command return a different set of hostnames depending on where the client request is coming from.