@@ -2379,7 +2379,7 @@ Sharding Parameters
2379
2379
2380
2380
Default: 1
2381
2381
2382
- |mongos-only |
2382
+ |both |
2383
2383
2384
2384
Minimum number of outbound connections each TaskExecutor connection
2385
2385
pool can open to any given :binary:`~bin.mongod` instance.
@@ -2390,6 +2390,19 @@ Sharding Parameters
2390
2390
connections until :parameter:`ShardingTaskExecutorPoolHostTimeoutMS`
2391
2391
milliseconds pass without any application using that pool.
2392
2392
2393
+ For a :binary:`~bin.mongos` using the
2394
+ :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartup`
2395
+ parameter, the ``ShardingTaskExecutorPoolMinSize`` parameter also
2396
+ controls how many connections to each shard host are established on
2397
+ startup of the :binary:`~bin.mongos` instance before it begins
2398
+ accepting incoming client connections.
2399
+
2400
+ .. note::
2401
+
2402
+ In MongoDB 4.4, the
2403
+ :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartup`
2404
+ parameter is enabled by default for the :binary:`~bin.mongos`.
2405
+
2393
2406
You can only set this parameter during start-up and cannot change
2394
2407
this setting using the :dbcommand:`setParameter` database command.
2395
2408
@@ -2401,7 +2414,8 @@ Sharding Parameters
2401
2414
pools, where ``n`` is the number of cores. See
2402
2415
:parameter:`taskExecutorPoolSize`.
2403
2416
2404
- .. seealso:: :parameter:`ShardingTaskExecutorPoolMaxSize`
2417
+ .. seealso:: - :parameter:`ShardingTaskExecutorPoolMaxSize`
2418
+ - :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartup`
2405
2419
2406
2420
.. parameter:: ShardingTaskExecutorPoolRefreshRequirementMS
2407
2421
@@ -2574,6 +2588,99 @@ Sharding Parameters
2574
2588
2575
2589
- :parameter:`ShardingTaskExecutorPoolMinSize`
2576
2590
2591
+ .. parameter:: loadRoutingTableOnStartup
2592
+
2593
+ .. versionadded:: 4.4
2594
+
2595
+ Type: boolean
2596
+
2597
+ *Default*: true
2598
+
2599
+ |mongos-only|
2600
+
2601
+ Configures a :binary:`~bin.mongos` instance to preload the routing
2602
+ table for a sharded cluster on startup. With this setting
2603
+ enabled, the :binary:`~bin.mongos` caches the cluster-wide routing
2604
+ table for each sharded collection as part of its startup procedure,
2605
+ before it begins accepting client connections.
2606
+
2607
+ Without this setting enabled, the :binary:`~bin.mongos` only loads
2608
+ a routing table as needed for incoming client connections, and only
2609
+ loads the specific routing table for the namespace of a given
2610
+ request.
2611
+
2612
+ A :binary:`~bin.mongos` instance with the
2613
+ :parameter:`loadRoutingTableOnStartup` parameter enabled may
2614
+ experience longer startup times, but will result in faster servicing
2615
+ of initial client connections once started.
2616
+
2617
+ :parameter:`loadRoutingTableOnStartup` is enabled by default.
2618
+
2619
+ You can only set this parameter on startup, using either the
2620
+ :setting:`setParameter` configuration file setting or the
2621
+ :option:`--setParameter <mongos --setParameter>` command line option.
2622
+
2623
+ .. parameter:: warmMinConnectionsInShardingTaskExecutorPoolOnStartup
2624
+
2625
+ .. versionadded:: 4.4
2626
+
2627
+ Type: boolean
2628
+
2629
+ *Default*: true
2630
+
2631
+ |mongos-only|
2632
+
2633
+ Configures a :binary:`~bin.mongos` instance to prewarm its connection
2634
+ pool on startup. With this parameter enabled, the
2635
+ :binary:`~bin.mongos` attempts to establish
2636
+ :parameter:`ShardingTaskExecutorPoolMinSize` network
2637
+ connections to each shard server as part of its startup procedure,
2638
+ before it begins accepting client connections.
2639
+
2640
+ A timeout for this behavior can be configured with the
2641
+ :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartupWaitMS`
2642
+ parameter. If this timeout is reached, the :binary:`~bin.mongos` will
2643
+ begin accepting client connections regardless of the size of its
2644
+ connection pool.
2645
+
2646
+ A :binary:`~bin.mongos` instance with this parameter enabled may
2647
+ experience longer startup times, but will result in faster servicing
2648
+ of initial client connections once started.
2649
+
2650
+ :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartup` is
2651
+ enabled by default.
2652
+
2653
+ You can only set this parameter on startup, using either the
2654
+ :setting:`setParameter` configuration file setting or the
2655
+ :option:`--setParameter <mongos --setParameter>` command line option.
2656
+
2657
+ .. seealso:: - :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartupWaitMS`
2658
+ - :parameter:`ShardingTaskExecutorPoolMinSize`
2659
+
2660
+ .. parameter:: warmMinConnectionsInShardingTaskExecutorPoolOnStartupWaitMS
2661
+
2662
+ .. versionadded:: 4.4
2663
+
2664
+ Type: integer
2665
+
2666
+ *Default*: 2000 (i.e. 2 seconds)
2667
+
2668
+ |mongos-only|
2669
+
2670
+ Sets the timeout threshold in milliseconds for a
2671
+ :binary:`~bin.mongos` to wait for :parameter:`ShardingTaskExecutorPoolMinSize`
2672
+ connections to be established per shard host when using the
2673
+ :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartup`
2674
+ parameter. If this timeout is reached, the :binary:`~bin.mongos` will
2675
+ begin accepting client connections regardless of the size of its
2676
+ connection pool.
2677
+
2678
+ You can only set this parameter on startup, using either the
2679
+ :setting:`setParameter` configuration file setting or the
2680
+ :option:`--setParameter <mongos --setParameter>` command line option.
2681
+
2682
+ .. seealso:: - :parameter:`warmMinConnectionsInShardingTaskExecutorPoolOnStartup`
2683
+ - :parameter:`ShardingTaskExecutorPoolMinSize`
2577
2684
2578
2685
.. parameter:: migrateCloneInsertionBatchDelayMS
2579
2686
0 commit comments