@@ -2389,3 +2389,270 @@ The ``security`` section defines configuration parameters related to various sec
2389
2389
| Type: boolean
2390
2390
| Default: false
2391
2391
| Environment variable: TT_SECURITY_SECURE_ERASING
2392
+
2393
+
2394
+
2395
+
2396
+ .. _configuration_reference_sharding :
2397
+
2398
+ sharding
2399
+ --------
2400
+
2401
+ The ``sharding `` section defines configuration parameters related to sharding using :ref: `vshard <vshard >`.
2402
+
2403
+ - :ref: `sharding.bucket_count <configuration_reference_sharding_bucket_count >`
2404
+ - :ref: `sharding.connection_outdate_delay <configuration_reference_sharding_connection_outdate_delay >`
2405
+ - :ref: `sharding.discovery_mode <configuration_reference_sharding_discovery_mode >`
2406
+ - :ref: `sharding.failover_ping_timeout <configuration_reference_sharding_failover_ping_timeout >`
2407
+ - :ref: `sharding.lock <configuration_reference_sharding_lock >`
2408
+ - :ref: `sharding.rebalancer_disbalance_threshold <configuration_reference_sharding_rebalancer_disbalance_threshold >`
2409
+ - :ref: `sharding.rebalancer_max_receiving <configuration_reference_sharding_rebalancer_max_receiving >`
2410
+ - :ref: `sharding.rebalancer_max_sending <configuration_reference_sharding_rebalancer_max_sending >`
2411
+ - :ref: `sharding.rebalancer_mode <configuration_reference_sharding_rebalancer_mode >`
2412
+ - :ref: `sharding.roles <configuration_reference_sharding_roles >`
2413
+ - :ref: `sharding.sched_move_quota <configuration_reference_sharding_sched_move_quota >`
2414
+ - :ref: `sharding.sched_ref_quota <configuration_reference_sharding_sched_ref_quota >`
2415
+ - :ref: `sharding.shard_index <configuration_reference_sharding_shard_index >`
2416
+ - :ref: `sharding.sync_timeout <configuration_reference_sharding_sync_timeout >`
2417
+ - :ref: `sharding.zone <configuration_reference_sharding_zone >`
2418
+
2419
+
2420
+
2421
+ .. _configuration_reference_sharding_bucket_count :
2422
+
2423
+ .. confval :: sharding.bucket_count
2424
+
2425
+ The total number of buckets in a cluster.
2426
+
2427
+ This number should be several orders of magnitude larger than the potential number
2428
+ of cluster nodes, considering potential scaling out in the foreseeable future.
2429
+
2430
+ **Example: **
2431
+
2432
+ If the estimated number of nodes is M, then the data set should be divided into
2433
+ 100M or even 1000M buckets, depending on the planned scaling out. This number is
2434
+ greater than the potential number of cluster nodes in the system being designed.
2435
+
2436
+ Keep in mind that too many buckets can cause a need to allocate more memory to store
2437
+ routing information. On the other hand, an insufficient number of buckets can lead to
2438
+ decreased granularity when rebalancing.
2439
+
2440
+ |
2441
+ | Type: integer
2442
+ | Default: 3000
2443
+ | Environment variable: TT_SHARDING_BUCKET_COUNT
2444
+
2445
+
2446
+ .. _configuration_reference_sharding_connection_outdate_delay :
2447
+
2448
+ .. confval :: sharding.connection_outdate_delay
2449
+
2450
+ [TODO] Router: Time to outdate old objects on reload.
2451
+
2452
+ |
2453
+ | Type: number
2454
+ | Default: nil
2455
+ | Environment variable: TT_SHARDING_CONNECTION_OUTDATE_DELAY
2456
+
2457
+
2458
+ .. _configuration_reference_sharding_discovery_mode :
2459
+
2460
+ .. confval :: sharding.discovery_mode
2461
+
2462
+ [TODO] A mode of a bucket discovery fiber.
2463
+ See details in :ref: `vshard.router.discovery_set() <router_api-discovery_set >`.
2464
+
2465
+ |
2466
+ | Type: string
2467
+ | Default: 'on'
2468
+ | Possible values: 'on', 'off', 'once'
2469
+ | Environment variable: TT_SHARDING_DISCOVERY_MODE
2470
+
2471
+
2472
+ .. _configuration_reference_sharding_failover_ping_timeout :
2473
+
2474
+ .. confval :: sharding.failover_ping_timeout
2475
+
2476
+ [TODO] Timeout after which a ping is considered to be unacknowledged.
2477
+ Used by failover fiber to detect if a node is down.
2478
+
2479
+ |
2480
+ | Type: number
2481
+ | Default: 5
2482
+ | Environment variable: TT_SHARDING_FAILOVER_PING_TIMEOUT
2483
+
2484
+
2485
+ .. _configuration_reference_sharding_lock :
2486
+
2487
+ .. confval :: sharding.lock
2488
+
2489
+ [TODO] Flag whether the replicaset is locked.
2490
+ If set to true, the replicaset won't send nor receive any buckets.
2491
+ Rebalancer will simply ignore it.
2492
+ To work this option must be set at least on the affected replicaset itself in its vshard.storage.cfg.
2493
+ Default is false.
2494
+
2495
+ Replica set scope.
2496
+
2497
+ |
2498
+ | Type: boolean
2499
+ | Default: nil
2500
+ | Environment variable: TT_SHARDING_LOCK
2501
+
2502
+
2503
+ .. _configuration_reference_sharding_rebalancer_disbalance_threshold :
2504
+
2505
+ .. confval :: sharding.rebalancer_disbalance_threshold
2506
+
2507
+ The maximum bucket disbalance threshold (in percent).
2508
+ The disbalance is calculated for each replica set using the following formula:
2509
+
2510
+ .. code-block :: none
2511
+
2512
+ |etalon_bucket_count - real_bucket_count| / etalon_bucket_count * 100
2513
+
2514
+ |
2515
+ | Type: number
2516
+ | Default: 1
2517
+ | Environment variable: TT_SHARDING_REBALANCER_DISBALANCE_THRESHOLD
2518
+
2519
+
2520
+ .. _configuration_reference_sharding_rebalancer_max_receiving :
2521
+
2522
+ .. confval :: sharding.rebalancer_max_receiving
2523
+
2524
+ The maximum number of buckets that can be received in parallel by a single
2525
+ replica set. This number must be limited, because when a new replica set is added to
2526
+ a cluster, the rebalancer sends a very large amount of buckets from the existing
2527
+ replica sets to the new one. This produces a heavy load on the new replica set.
2528
+
2529
+ **Example: **
2530
+
2531
+ Suppose ``rebalancer_max_receiving `` is equal to 100, ``bucket_count `` is equal to 1000.
2532
+ There are 3 replica sets with 333, 333 and 334 buckets on each respectively.
2533
+ When a new replica set is added, each replica set’s ``etalon_bucket_count `` becomes
2534
+ equal to 250. Rather than receiving all 250 buckets at once, the new replica set
2535
+ receives 100, 100 and 50 buckets sequentially.
2536
+
2537
+ |
2538
+ | Type: integer
2539
+ | Default: 100
2540
+ | Environment variable: TT_SHARDING_REBALANCER_MAX_RECEIVING
2541
+
2542
+
2543
+ .. _configuration_reference_sharding_rebalancer_max_sending :
2544
+
2545
+ .. confval :: sharding.rebalancer_max_sending
2546
+
2547
+ The degree of parallelism for :ref: `parallel rebalancing <vshard-parallel-rebalancing >`.
2548
+
2549
+ Works for storages only, ignored for routers.
2550
+
2551
+ |
2552
+ | Type: integer
2553
+ | Default: 1
2554
+ | Maximum: 15
2555
+ | Environment variable: TT_SHARDING_REBALANCER_MAX_SENDING
2556
+
2557
+
2558
+ .. _configuration_reference_sharding_rebalancer_mode :
2559
+
2560
+ .. confval :: sharding.rebalancer_mode
2561
+
2562
+ [TODO] A rebalancer mode:
2563
+
2564
+ * ``manual ``
2565
+ * ``auto ``
2566
+ * ``off ``
2567
+
2568
+ |
2569
+ | Type: string
2570
+ | Default: 'auto'
2571
+ | Environment variable: TT_SHARDING_REBALANCER_MODE
2572
+
2573
+
2574
+ .. _configuration_reference_sharding_roles :
2575
+
2576
+ .. confval :: sharding.roles
2577
+
2578
+ [TODO] A sharding role:
2579
+
2580
+ * ``router ``
2581
+ * ``storage ``
2582
+ * ``rebalancer ``
2583
+
2584
+ Replica set scope.
2585
+
2586
+ |
2587
+ | Type: array
2588
+ | Default: nil
2589
+ | Environment variable: TT_SHARDING_ROLES
2590
+
2591
+
2592
+ .. _configuration_reference_sharding_sched_move_quota :
2593
+
2594
+ .. confval :: sharding.sched_move_quota
2595
+
2596
+ [TODO] Scheduler bucket move quota.
2597
+
2598
+ |
2599
+ | Type: number
2600
+ | Default: 1
2601
+ | Environment variable: TT_SHARDING_SCHED_MOVE_QUOTA
2602
+
2603
+
2604
+ .. _configuration_reference_sharding_sched_ref_quota :
2605
+
2606
+ .. confval :: sharding.sched_ref_quota
2607
+
2608
+ [TODO] Scheduler storage ref quota.
2609
+
2610
+ The scheduler shares storage time between bucket moves and storage refs fairly. The distribution depends on how long and frequent the moves and refs are. It can be configured using the storage options ``sched_move_quota `` and ``sched_ref_quota ``. Keep in mind that the scheduler configuration may affect map-reduce requests if used during rebalancing.
2611
+
2612
+ |
2613
+ | Type: number
2614
+ | Default: 300
2615
+ | Environment variable: TT_SHARDING_SCHED_REF_QUOTA
2616
+
2617
+
2618
+ .. _configuration_reference_sharding_shard_index :
2619
+
2620
+ .. confval :: sharding.shard_index
2621
+
2622
+ The name or ID of a TREE index over the :ref: `bucket id <vshard-vbuckets >`.
2623
+ Spaces without this index do not participate in a sharded Tarantool
2624
+ cluster and can be used as regular spaces if needed. It is necessary to
2625
+ specify the first part of the index, other parts are optional.
2626
+
2627
+ |
2628
+ | Type: string
2629
+ | Default: 'bucket_id'
2630
+ | Environment variable: TT_SHARDING_SHARD_INDEX
2631
+
2632
+
2633
+ .. _configuration_reference_sharding_sync_timeout :
2634
+
2635
+ .. confval :: sharding.sync_timeout
2636
+
2637
+ The timeout to wait for synchronization of the old master with replicas before demotion.
2638
+ Used when switching a master or when manually calling the :ref: `sync() <storage_api-sync >` function.
2639
+
2640
+ |
2641
+ | Type: number
2642
+ | Default: 1
2643
+ | Environment variable: TT_SHARDING_SYNC_TIMEOUT
2644
+
2645
+
2646
+ .. _configuration_reference_sharding_zone :
2647
+
2648
+ .. confval :: sharding.zone
2649
+
2650
+ [TODO] Replica zone (see weighted routing in the section 'Replicas weight configuration');
2651
+ Zone where the replica is located. String or number. See weights root config option for more info about what zones do. Default is nil. If a replica has no zone, in the weights matrix it gets the worst score.
2652
+
2653
+ Instance scope.
2654
+
2655
+ |
2656
+ | Type: integer
2657
+ | Default: nil
2658
+ | Environment variable: TT_SHARDING_ZONE
0 commit comments