2024-10-30 stan

matchengine server配置所需的配置文件名为config.json,和其源文件在同一目录。下面让我一一解读这个配置文件的所有配置项,以便从宏观上,对这个server有一个概要了解。

我按照这个配置文件的功能模块逐步分析:

1. 基础系统配置

{
    "debug": true,
    "process": {
        "file_limit": 1000000,
        "core_limit": 1000000000
    }
}

2. 日志配置

{
    "log": {
        "path": "./log",
        "flag": "fatal,error,warn,info,debug,trace",
        "num": 10
    },
    "alert": {
        "host": "matchengine",
        "addr": "127.0.0.1:4444"
    }
}

3. 网络服务配置

{
    "svr": {
        "bind": [
            "[email protected]:7316",
            "[email protected]:7316"
        ],
        "buf_limit": 100,
        "max_pkg_size": 10240,
        "heartbeat_check": false
    },
    "cli": "[email protected]:7317"
}