2014-08-07 12:49:48 +04:00
|
|
|
# LedisDB configuration
|
|
|
|
|
|
|
|
# Server listen address
|
|
|
|
addr = "127.0.0.1:6380"
|
|
|
|
|
|
|
|
# Server http listen address, set empty to disable
|
|
|
|
http_addr = "127.0.0.1:11181"
|
|
|
|
|
|
|
|
# Data store path, all ledisdb's data will be saved here
|
|
|
|
data_dir = "/tmp/ledis_server"
|
|
|
|
|
|
|
|
# Log server command, set empty to disable
|
|
|
|
access_log = ""
|
|
|
|
|
|
|
|
# Set slaveof to enable replication from master, empty, no replication
|
2014-09-25 12:03:29 +04:00
|
|
|
# Any write operations except flushall and replication will be disabled in slave mode.
|
2014-08-07 12:49:48 +04:00
|
|
|
slaveof = ""
|
|
|
|
|
|
|
|
# Choose which backend storage to use, now support:
|
|
|
|
#
|
|
|
|
# leveldb
|
|
|
|
# rocksdb
|
|
|
|
# goleveldb
|
|
|
|
# lmdb
|
|
|
|
# boltdb
|
2014-09-04 10:02:47 +04:00
|
|
|
# hyperleveldb
|
|
|
|
# memory
|
2014-08-07 12:49:48 +04:00
|
|
|
#
|
|
|
|
db_name = "leveldb"
|
|
|
|
|
2014-09-18 18:30:33 +04:00
|
|
|
# If not set, use data_dir/"db_name"_data
|
|
|
|
db_path = ""
|
|
|
|
|
2014-09-23 13:28:09 +04:00
|
|
|
# enable replication or not
|
|
|
|
use_replication = true
|
|
|
|
|
2014-08-07 12:49:48 +04:00
|
|
|
[leveldb]
|
|
|
|
compression = false
|
|
|
|
block_size = 32768
|
|
|
|
write_buffer_size = 67108864
|
|
|
|
cache_size = 524288000
|
|
|
|
max_open_files = 1024
|
|
|
|
|
|
|
|
[lmdb]
|
|
|
|
map_size = 524288000
|
2014-08-15 06:46:48 +04:00
|
|
|
nosync = true
|
2014-08-07 12:49:48 +04:00
|
|
|
|
2014-09-22 13:50:51 +04:00
|
|
|
[replication]
|
|
|
|
# Path to store replication information(write ahead log, commit log, etc.)
|
|
|
|
# if not set, use data_dir/rpl
|
|
|
|
path = ""
|
2014-09-17 13:54:04 +04:00
|
|
|
|
2014-09-22 13:50:51 +04:00
|
|
|
# Expire write ahead logs after the given days
|
|
|
|
expired_log_days = 7
|
2014-08-07 12:49:48 +04:00
|
|
|
|
2014-09-23 13:28:09 +04:00
|
|
|
# If sync is true, the new log must be sent to some slaves, and then commit.
|
2014-09-27 05:10:08 +04:00
|
|
|
# It will reduce performance but have better high availability.
|
2014-09-23 13:28:09 +04:00
|
|
|
sync = true
|
|
|
|
|
2014-09-27 05:10:08 +04:00
|
|
|
# If sync is true, wait at last wait_sync_time seconds for slave syncing this log
|
2014-09-23 13:28:09 +04:00
|
|
|
wait_sync_time = 1
|
2014-08-07 12:49:48 +04:00
|
|
|
|
2014-10-05 13:24:44 +04:00
|
|
|
# If sync is true, wait at most min(wait_max_slave_acks, (n + 1) / 2) to promise syncing ok.
|
|
|
|
# n is slave number
|
|
|
|
# If 0, wait (n + 1) / 2 acks.
|
|
|
|
wait_max_slave_acks = 2
|
|
|
|
|
2014-09-27 05:10:08 +04:00
|
|
|
# Compress the log or not
|
|
|
|
compression = true
|