@@ -55,17 +55,31 @@ would like to bypass the auto-discovery, pass the
5555 Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'mydb', :connect => :sharded)
5656 Mongo::Client.new('mongodb://127.0.0.1:27017/mydb?connect=sharded')
5757
58- The URI parser in the driver can also accept the protocol ``mongodb+srv`` as a logical
59- pre-processing step before it considers the connection string and other options.
60- In this protocol, the comma separated list of host names is replaced with a single host name. The format is :
58+ The URI parser in the driver also accepts the
59+ :manual:`mongodb+srv protocol <reference/ connection- string/#dns-seedlist-connection-format>`
60+ URIs, for example :
6161
6262.. code-block:: ruby
6363
6464 Mongo::Client.new('mongodb+srv://test5.test.build.mongodb.cc')
6565
66- .. _ruby-driver-client-options:
66+ When an SRV URI is given, the driver does the following:
67+
68+ 1. As part of ``Client`` object construction, the SRV URI is resolved to
69+ the actual hosts comprising the deployment, as these are defined in the DNS
70+ SRV records.
71+ 2. The driver looks up URI options in the DNS TXT records corresponding to the
72+ SRV records. These options can be overridden by URI options specified in the
73+ URI and by Ruby options, in this order.
74+ 3. If the topology of the constructed ``Client`` object is unknown or a
75+ sharded cluster, the driver will begin monitoring the specified SRV DNS
76+ records for changes and will automatically update the list of servers in the
77+ cluster. The updates will stop if the topology becomes a single or a replica
78+ set.
6779
6880
81+ .. _ruby-driver-client-options:
82+
6983Client Options
7084--------------
7185
0 commit comments