forked from arana-db/kiwi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
62 lines (56 loc) · 2.07 KB
/
config.example.toml
File metadata and controls
62 lines (56 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright (c) 2024-present, arana-db Community. All rights reserved.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Example Kiwi Runtime Configuration
# This file demonstrates all available configuration options
# Basic runtime configuration
network_threads = 4
storage_threads = 8
channel_buffer_size = 10000
request_timeout_secs = 30
batch_size = 100
batch_timeout_millis = 10
# Dynamic thread pool scaling configuration
[scaling]
enabled = true
min_network_threads = 2
max_network_threads = 16
min_storage_threads = 4
max_storage_threads = 32
scale_up_threshold = 80 # Scale up when queue is 80% full
scale_down_threshold = 20 # Scale down when queue is 20% full
scale_increment = 1 # Add/remove 1 thread at a time
evaluation_interval_ms = 1000
# Request priority configuration
[priority]
enabled = true
high_priority_weight = 3
normal_priority_weight = 2
low_priority_weight = 1
max_queue_size_per_priority = 10000
# Raft metrics collection configuration
[raft_metrics]
enabled = true
collection_interval_ms = 100
retention_period_secs = 3600
track_replication_latency = true
track_election_events = true
# Fault injection configuration (for testing only)
[fault_injection]
enabled = false # Should only be true in test environments
default_network_delay_ms = 100
default_drop_rate = 0.1 # 10% message drop rate
log_events = true