From: xie xingguo Date: Mon, 18 Mar 2019 02:11:47 +0000 (+0800) Subject: doc/mon-lookup-dns: update "mon weight" related changes X-Git-Tag: v15.0.0~143^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ba6b267db94d0ae19e5fe62d7d953bd9f5edf91;p=ceph.git doc/mon-lookup-dns: update "mon weight" related changes Signed-off-by: xie xingguo --- diff --git a/doc/rados/configuration/mon-lookup-dns.rst b/doc/rados/configuration/mon-lookup-dns.rst index e32b3206ad872..5c29570949cb7 100644 --- a/doc/rados/configuration/mon-lookup-dns.rst +++ b/doc/rados/configuration/mon-lookup-dns.rst @@ -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.