# 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 # Any write operations except flushall and replication will be disabled in slave mode. slaveof = "" # Readonly mode, slave server is always readonly even readonly = false # for readonly mode, only replication and flushall can write readonly = false # Choose which backend storage to use, now support: # # leveldb # rocksdb # goleveldb # lmdb # boltdb # memory # db_name = "leveldb" # If not set, use data_dir/"db_name"_data db_path = "" # Sync commit to disk if possible # 0: no sync # 1: sync every second # 2: sync every commit db_sync_commit = 0 # enable replication or not use_replication = true [leveldb] compression = false block_size = 32768 write_buffer_size = 67108864 cache_size = 524288000 max_open_files = 1024 [lmdb] map_size = 524288000 nosync = true [replication] # Path to store replication information(write ahead log, commit log, etc.) # if not set, use data_dir/rpl path = "" # If sync is true, the new log must be sent to some slaves, and then commit. # It will reduce performance but have better high availability. sync = true # If sync is true, wait at last wait_sync_time milliseconds for slave syncing this log wait_sync_time = 500 # 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 # Expire write ahead logs after the given days expired_log_days = 7 # Sync log to disk if possible # 0: no sync # 1: sync every second # 2: sync every commit sync_log = 0 # Compress the log or not compression = true [snapshot] # Path to store snapshot dump file # if not set, use data_dir/snapshot # snapshot file name format is dmp-2006-01-02T15:04:05.999999999 path = "" # Reserve newest max_num snapshot dump files max_num = 1