@@ -248,14 +248,14 @@ Load Balancing
248
248
249
249
When connecting to a sharded cluster or a replica set, the {+library-short+} uses
250
250
**load balancing** to handle read and write requests. Load balancing allows the library to
251
- distribute these requests across multiple servers, which avoids overwhelming
252
- any one server and ensures optimal performance.
251
+ distribute these requests across multiple servers to avoid overwhelming
252
+ any one server and ensure optimal performance.
253
253
254
- When connecting to a sharded cluster, the {+library-short+} determines the closest mongos
254
+ When connecting to a sharded cluster, the {+library-short+} determines the closest `` mongos``
255
255
instance by calculating which one has the lowest network round-trip time. Then, the library
256
- determines the latency window by adding this mongos's average round-trip time to the
256
+ determines the latency window by adding this `` mongos`` 's average round-trip time to the
257
257
:ref:`localThresholdMS value <php-local-threshold>`. The library load balances requests
258
- across up to two random mongos instances that fall within the latency window. For each request,
258
+ across up to two random `` mongos`` instances that fall within the latency window. For each request,
259
259
the library chooses the server with the lower operation load by determining its ``operationCount``
260
260
value.
261
261
@@ -267,11 +267,11 @@ the member with the lower ``operationCount`` value to receive the request.
267
267
268
268
.. tip::
269
269
270
- To learn more about load balancing, see :manual:`Sharded Cluster Balancer
271
- </core/sharding-balancer-administration/>` in the {+mdb-server+} manual.
270
+ To learn more about load balancing, see :manual:`Sharded Cluster Balancer
271
+ </core/sharding-balancer-administration/>` in the {+mdb-server+} manual.
272
272
273
- To learn how to customize the library's server selection behavior, see
274
- :ref:`php-selection-discovery-options` in the Specify Connection Options guide.
273
+ To learn how to customize the library's server selection behavior, see
274
+ :ref:`php-selection-discovery-options` in the Specify Connection Options guide.
275
275
276
276
.. _php-local-threshold:
277
277
@@ -282,7 +282,7 @@ The {+library-short+} uses the local threshold value to calculate the
282
282
latency window for server selection. This value determines the servers
283
283
that are eligible to receive read and write requests.
284
284
285
- By default, the library uses only mongos instances or replica set members whose
285
+ By default, the library uses only `` mongos`` instances or replica set members whose
286
286
ping times are within 15 milliseconds of the nearest server. To
287
287
distribute reads among servers with higher latencies, pass an options array to
288
288
the ``MongoDB\Client`` constructor that sets the ``localThresholdMS`` option.
0 commit comments