Upload files to "/"
This commit is contained in:
1 parent
b0b3bdd789
commit
2ba38f1000
1 file changed
+374
+374
@@ -0,0 +1,374 @@
|
||||
#
|
||||
# Copyright 2026 Grigorii Safronov
|
||||
#
|
||||
# Licensed under the CDDL, Version 1.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
#
|
||||
# You may obtain a copy of the License at
|
||||
# https://opensource.org/licenses/CDDL-1.0
|
||||
#
|
||||
|
||||
# ============================================================================
|
||||
# КОНФИГУРАЦИОННЫЙ ФАЙЛ СУБД futriiX
|
||||
# ============================================================================
|
||||
# Данный файл содержит все настройки для работы кластерной СУБД futriiX.
|
||||
# Формат: TOML (Tom's Obvious, Minimal Language)
|
||||
# ============================================================================
|
||||
|
||||
# ============================================================================
|
||||
# [cluster] - НАСТРОЙКИ КЛАСТЕРА
|
||||
# ============================================================================
|
||||
[cluster]
|
||||
name = "test_cluster"
|
||||
node_ip = "192.168.0.103"
|
||||
node_port = 9876
|
||||
raft_port = 9878
|
||||
raft_data_dir = "raft_data"
|
||||
bootstrap = true
|
||||
nodes = [
|
||||
"192.168.0.103:9878",
|
||||
]
|
||||
heartbeat_timeout_ms = 1000
|
||||
election_timeout_ms = 1000
|
||||
commit_timeout_ms = 500
|
||||
snapshot_interval_min = 30
|
||||
snapshot_threshold = 1000
|
||||
split_brain_prevention = true
|
||||
recovery_timeout_sec = 30
|
||||
region = "default"
|
||||
priority_zone = 0
|
||||
|
||||
# ============================================================================
|
||||
# [storage] - НАСТРОЙКИ ХРАНИЛИЩА
|
||||
# ============================================================================
|
||||
[storage]
|
||||
page_size_mb = 64
|
||||
max_collections = 100
|
||||
max_documents_per_collection = 1000000
|
||||
default_engine = "row"
|
||||
enable_custom_engines = true
|
||||
|
||||
# ============================================================================
|
||||
# [repl] - НАСТРОЙКИ REPL
|
||||
# ============================================================================
|
||||
[repl]
|
||||
prompt_color = "#00bfff"
|
||||
history_size = 1000
|
||||
migration_commands = true
|
||||
|
||||
# ============================================================================
|
||||
# [log] - НАСТРОЙКИ ЛОГИРОВАНИЯ
|
||||
# ============================================================================
|
||||
[log]
|
||||
log_file = "futriix.log"
|
||||
log_level = "debug"
|
||||
|
||||
# ============================================================================
|
||||
# [api] - НАСТРОЙКИ HTTP API
|
||||
# ============================================================================
|
||||
[api]
|
||||
port = 8080
|
||||
|
||||
# ============================================================================
|
||||
# [replication] - НАСТРОЙКИ РЕПЛИКАЦИИ
|
||||
# ============================================================================
|
||||
[replication]
|
||||
enabled = false
|
||||
sync_replication = false
|
||||
replication_timeout_ms = 5000
|
||||
max_replica_lag_ms = 5000
|
||||
|
||||
# ============================================================================
|
||||
# [compression] - НАСТРОЙКИ СЖАТИЯ
|
||||
# ============================================================================
|
||||
[compression]
|
||||
enabled = true
|
||||
algorithm = "snappy"
|
||||
level = 3
|
||||
min_size = 1024
|
||||
|
||||
# ============================================================================
|
||||
# [webui] - НАСТРОЙКИ ВЕБ-ИНТЕРФЕЙСА
|
||||
# ============================================================================
|
||||
[webui]
|
||||
enabled = true
|
||||
port = 9080
|
||||
theme = "dark"
|
||||
|
||||
# ============================================================================
|
||||
# [performance] - НАСТРОЙКИ ПРОИЗВОДИТЕЛЬНОСТИ
|
||||
# ============================================================================
|
||||
[performance]
|
||||
enable_pipeline = true
|
||||
batch_size = 100
|
||||
read_from_follower = true
|
||||
max_connections = 1000
|
||||
read_replica_delay_ms = 100
|
||||
|
||||
# ============================================================================
|
||||
# [security] - НАСТРОЙКИ БЕЗОПАСНОСТИ
|
||||
# ============================================================================
|
||||
[security]
|
||||
enable_tls = false
|
||||
cert_file = ""
|
||||
key_file = ""
|
||||
ca_file = ""
|
||||
min_version = "1.2"
|
||||
|
||||
# ============================================================================
|
||||
# [monitoring] - НАСТРОЙКИ МОНИТОРИНГА
|
||||
# ============================================================================
|
||||
[monitoring]
|
||||
enable_metrics = true
|
||||
metrics_port = 9090
|
||||
enable_tracing = false
|
||||
trace_sample_rate = 0.01
|
||||
|
||||
# ============================================================================
|
||||
# [recovery] - НАСТРОЙКИ ВОССТАНОВЛЕНИЯ
|
||||
# ============================================================================
|
||||
[recovery]
|
||||
auto_rejoin = true
|
||||
max_retry_sec = 300
|
||||
data_replication_timeout_sec = 60
|
||||
stale_read_timeout_sec = 30
|
||||
|
||||
# ============================================================================
|
||||
# [wal] - НАСТРОЙКИ WAL
|
||||
# ============================================================================
|
||||
[wal]
|
||||
segment_size_mb = 64
|
||||
sync_interval_sec = 5
|
||||
batch_size = 100
|
||||
recovery_workers = 4
|
||||
enabled = true
|
||||
async_recovery = true
|
||||
async_recovery_workers = 4
|
||||
async_recovery_buffer = 10000
|
||||
|
||||
# ============================================================================
|
||||
# [mvcc] - НАСТРОЙКИ MVCC
|
||||
# ============================================================================
|
||||
[mvcc]
|
||||
max_versions_per_doc = 10
|
||||
visibility_map_size = 1048576
|
||||
prune_interval_min = 5
|
||||
retention_days = 7
|
||||
read_cache_size = 10000
|
||||
read_cache_ttl_sec = 300
|
||||
|
||||
# ============================================================================
|
||||
# [transactions] - НАСТРОЙКИ ТРАНЗАКЦИЙ
|
||||
# ============================================================================
|
||||
[transactions]
|
||||
default_timeout_sec = 30
|
||||
deadlock_check_interval_sec = 1
|
||||
max_savepoints_per_tx = 100
|
||||
enabled = true
|
||||
checkpoint_interval_sec = 300
|
||||
|
||||
# ============================================================================
|
||||
# [saga] - НАСТРОЙКИ SAGA ОРКЕСТРАТОРА
|
||||
# ============================================================================
|
||||
[saga]
|
||||
enabled = true
|
||||
coordinator_count = 3
|
||||
state_dir = "saga_states"
|
||||
max_retries = 5
|
||||
retry_backoff_ms = 100
|
||||
saga_timeout_sec = 300
|
||||
stuck_check_interval_sec = 10
|
||||
leader_election_interval_sec = 5
|
||||
recovery_interval_sec = 30
|
||||
metrics_interval_sec = 60
|
||||
cleanup_period_hours = 24
|
||||
max_cache_size = 10000
|
||||
operation_retention_days = 7
|
||||
channel_buffer_size = 10000
|
||||
async_recovery_workers = 4
|
||||
async_recovery_timeout_sec = 30
|
||||
fsync_enabled = true
|
||||
fsync_max_retries = 3
|
||||
fsync_retry_delay_ms = 100
|
||||
|
||||
# ============================================================================
|
||||
# [acl] - НАСТРОЙКИ ACL
|
||||
# ============================================================================
|
||||
[acl]
|
||||
max_denied_log_size = 10000
|
||||
temporary_grant_ttl_hours = 24
|
||||
enable_role_hierarchy = true
|
||||
cache_ttl_sec = 60
|
||||
|
||||
# ============================================================================
|
||||
# [plugins] - НАСТРОЙКИ ПЛАГИНОВ
|
||||
# ============================================================================
|
||||
[plugins]
|
||||
enabled = true
|
||||
script_dir = "plugins"
|
||||
allow_list = ["print", "math", "string", "table", "engine"]
|
||||
max_lua_states = 100
|
||||
lua_state_ttl_sec = 600
|
||||
max_cpu_time_ms = 100
|
||||
max_memory_mb = 50
|
||||
max_execution_time_sec = 5
|
||||
max_instructions = 1000000
|
||||
hot_reload_interval_sec = 30
|
||||
max_event_log_size = 1000
|
||||
load_timeout_sec = 10
|
||||
engine_plugin_dir = "engines"
|
||||
|
||||
# ============================================================================
|
||||
# [engines] - НАСТРОЙКИ КАСТОМНЫХ ДВИЖКОВ ← РЕАЛИЗОВАНО
|
||||
# ============================================================================
|
||||
[engines]
|
||||
[engines.row]
|
||||
enabled = true
|
||||
description = "Row-based storage engine (default)"
|
||||
config = {}
|
||||
|
||||
[engines.columnar]
|
||||
enabled = false
|
||||
description = "Columnar storage engine for analytics"
|
||||
config = { compression = "zstd", block_size = 65536 }
|
||||
|
||||
[engines.document]
|
||||
enabled = false
|
||||
description = "Document-oriented storage engine"
|
||||
config = { auto_index = true, max_nesting = 32 }
|
||||
|
||||
[engines.kv]
|
||||
enabled = false
|
||||
description = "Key-Value storage engine"
|
||||
config = { ttl_enabled = true, ttl_default_seconds = 86400 }
|
||||
|
||||
[engines.ts]
|
||||
enabled = false
|
||||
description = "Time-series storage engine"
|
||||
config = { chunk_interval_seconds = 3600, retention_days = 30 }
|
||||
|
||||
[engines.graph]
|
||||
enabled = false
|
||||
description = "Graph storage engine"
|
||||
config = { vertex_label = "node", edge_label = "relationship" }
|
||||
|
||||
# ============================================================================
|
||||
# [cluster_tls] - TLS ДЛЯ МЕЖУЗЛОВОГО ОБЩЕНИЯ
|
||||
# ============================================================================
|
||||
[cluster_tls]
|
||||
enabled = false
|
||||
cert_file = "certs/node.crt"
|
||||
key_file = "certs/node.key"
|
||||
ca_file = "certs/ca.crt"
|
||||
min_version = "1.2"
|
||||
mutual_auth = false
|
||||
key_rotation_days = 30
|
||||
auto_generate = false
|
||||
|
||||
# ============================================================================
|
||||
# [backpressure] - НАСТРОЙКИ BACKPRESSURE
|
||||
# ============================================================================
|
||||
[backpressure]
|
||||
enabled = true
|
||||
cpu_threshold = 0.80
|
||||
memory_threshold = 0.85
|
||||
queue_size_threshold = 10000
|
||||
connection_threshold = 5000
|
||||
check_interval_ms = 1000
|
||||
low_delay_ms = 100
|
||||
medium_reject_prob = 30
|
||||
high_reject_prob = 70
|
||||
|
||||
# ============================================================================
|
||||
# [runtime_limits] - ОГРАНИЧЕНИЯ НА УРОВНЕ ВЫПОЛНЕНИЯ
|
||||
# ============================================================================
|
||||
[runtime_limits]
|
||||
enabled = true
|
||||
global_max_doc_size_mb = 16
|
||||
global_max_coll_size_mb = 10240
|
||||
global_max_docs_per_coll = 10000000
|
||||
|
||||
# ============================================================================
|
||||
# [autoscaling] - НАСТРОЙКИ АВТОМАСШТАБИРОВАНИЯ ← РЕАЛИЗОВАНО
|
||||
# ============================================================================
|
||||
[autoscaling]
|
||||
enabled = false
|
||||
min_nodes = 1
|
||||
max_nodes = 10
|
||||
scale_up_threshold = 0.75
|
||||
scale_down_threshold = 0.30
|
||||
scale_up_cooldown_sec = 300
|
||||
scale_down_cooldown_sec = 600
|
||||
evaluation_interval_sec = 30
|
||||
predictive_enabled = true
|
||||
max_scale_up_nodes = 3
|
||||
max_scale_down_nodes = 2
|
||||
|
||||
# ============================================================================
|
||||
# [schema_migration] - НАСТРОЙКИ МИГРАЦИИ СХЕМЫ
|
||||
# ============================================================================
|
||||
[schema_migration]
|
||||
enabled = true
|
||||
migration_dir = "migrations"
|
||||
auto_migrate = true
|
||||
target_version = "2.1.0"
|
||||
|
||||
# ============================================================================
|
||||
# [backup] - НАСТРОЙКИ БЭКАПОВ ← РЕАЛИЗОВАНО
|
||||
# ============================================================================
|
||||
[backup]
|
||||
enabled = true
|
||||
backup_dir = "backups"
|
||||
max_concurrent = 1
|
||||
compress_enabled = true
|
||||
retention_days = 7
|
||||
# Дополнительные поля, используемые BackupScheduler (см. backup_scheduler.go):
|
||||
include_saga_state = true
|
||||
enable_incremental = true
|
||||
|
||||
# ============================================================================
|
||||
# [migration] - CROSS-DATACENTER MIGRATION
|
||||
# ============================================================================
|
||||
[migration]
|
||||
enabled = false
|
||||
mode = "semi_auto"
|
||||
|
||||
[migration.source]
|
||||
name = "dc-primary"
|
||||
endpoint = "localhost:8080"
|
||||
api_key = ""
|
||||
timeout_sec = 30
|
||||
|
||||
[migration.target]
|
||||
name = "dc-secondary"
|
||||
endpoint = "localhost:8081"
|
||||
api_key = ""
|
||||
timeout_sec = 30
|
||||
|
||||
[migration.settings]
|
||||
batch_size = 1000
|
||||
workers = 4
|
||||
compression = "snappy"
|
||||
resume_enabled = true
|
||||
checkpoint_interval_sec = 30
|
||||
max_retries = 3
|
||||
retry_backoff_sec = 5
|
||||
collections = []
|
||||
exclude_collections = []
|
||||
|
||||
[migration.delta]
|
||||
enabled = true
|
||||
interval_sec = 60
|
||||
max_lag_sec = 300
|
||||
|
||||
[migration.validation]
|
||||
enabled = true
|
||||
sample_percent = 10
|
||||
max_errors = 100
|
||||
|
||||
# ============================================================================
|
||||
# [metrics] - НАСТРОЙКИ МЕТРИК
|
||||
# ============================================================================
|
||||
[metrics]
|
||||
enabled = true
|
||||
collect_interval_sec = 15
|
||||
Reference in new issue
Block a user