FlashNode Configuration

Configuration Description

Configuration ItemTypeDescriptionRequiredDefault Value
rolestringThe role of the process, the value can only be flashnodeYes
listenstringPort number on which the TCP service listensYes
profstringGolang pprof port numberNo
logDirstringDirectory for storing log filesYes
logLevelstringLog levelNoerror
masterAddrstring sliceAddress of the master serviceYes
disableTmpfsboolUse disk instead of tmpfs mount. The default value is false, indicating tmpfs is enabled by default.Nofalse
memTotalintMemory size allocated for caching data when using memory modeYes
cachePercentfloatSpecifies the percentage of system memory used for caching when in memory mode, and the percentage of disk space used when in disk modeNo1.0
readRpsintThe RPS (Requests Per Second) value of FlashNode, used for rate limiting on the FlashNode.Yes
diskDataPathstring sliceIn disk mode, this field indicates the disk path and the corresponding cache capacity allocated on that disk.Yes
zoneNamestringFlashNodes can be organized and managed by zone, and the command-line interface (CLI) provides support for deleting nodes based on their zone.Yes
lruCapacityintSet the maximum number of entries (keys) that the LRU cache can holdNo400000

Configuration Example

{
    "role": "flashnode",
    "listen": "18510",
    "prof": "18511",
    "logDir": "./logs",
    "masterAddr": [
        "xxx",
        "xxx",
        "xxx"
    ],
    "memTotal": 0,
    "cachePercent": 0.8,
    "readRps": 100000,
    "disableTmpfs": true,
    "diskDataPath": [
      "/path/data1:0",
      "/path/data2:0"
      ],
    "zoneName":"default"
}
Edit on GitHub