]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/mon-lookup-dns: update "mon weight" related changes
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 18 Mar 2019 02:11:47 +0000 (10:11 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 20 Mar 2019 04:17:00 +0000 (12:17 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
doc/rados/configuration/mon-lookup-dns.rst

index e32b3206ad8726d0150195edfd9af083fbe026da..5c29570949cb7d06099f4828953531eabd43cc2c 100644 (file)
@@ -42,10 +42,15 @@ With those records now existing we can create the SRV TCP records with the name
 
 ::
 
-    _ceph-mon._tcp.example.com. 60 IN SRV 10 60 6789 mon1.example.com.
-    _ceph-mon._tcp.example.com. 60 IN SRV 10 60 6789 mon2.example.com.
-    _ceph-mon._tcp.example.com. 60 IN SRV 10 60 6789 mon3.example.com.
+    _ceph-mon._tcp.example.com. 60 IN SRV 10 20 6789 mon1.example.com.
+    _ceph-mon._tcp.example.com. 60 IN SRV 10 30 6789 mon2.example.com.
+    _ceph-mon._tcp.example.com. 60 IN SRV 20 50 6789 mon3.example.com.
 
-In this case the Monitors are running on port *6789*, and their priority and weight are all *10* and *60* respectively.
+Now all Monitors are running on port *6789*, with priorities 10, 10, 20 and weights 20, 30, 50 respectively.
 
-The current implementation in clients and daemons will *only* respect the priority set in SRV records, and they will only connect to the monitors with lowest-numbered priority. The targets with the same priority will be selected at random.
+Monitor clients choose monitor by referencing the SRV records. If a cluster has multiple Monitor SRV records
+with the same priority value, clients and daemons will load balance the connections to Monitors in proportion
+to the values of the SRV weight fields.
+
+For the above example, this will result in approximate 40% of the clients and daemons connecting to mon1,
+60% of them connecting to mon2. However, if neither of them is reachable, then mon3 will be reconsidered as a fallback.