Skip to content

[配置]server

jamie12221 edited this page Nov 29, 2020 · 1 revision

server配置

Mycat没有固定的配置格式,暂时支持json,yaml格式

{
  "datasourceProvider":"io.mycat.datasource.jdbc.datasourceprovider.DruidDatasourceProvider",
  "loadBalance":{
    "defaultLoadBalance":"BalanceRandom",
    "loadBalances":[]
  },
  "mode":"local",
  "properties":{},
  "server":{
    "bufferPool":{

    },
    "idleTimer":{
      "initialDelay":3,
      "period":15,
      "timeUnit":"SECONDS"
    },
    "ip":"127.0.0.1",
    "mycatId":1,
    "port":8066,
    "reactorNumber":8,
    "tempDirectory":null,
    "timeWorkerPool":{
      "corePoolSize":0,
      "keepAliveTime":1,
      "maxPendingLimit":65535,
      "maxPoolSize":2,
      "taskTimeout":1,
      "timeUnit":"MINUTES"
    },
    "workerPool":{
      "corePoolSize":8,
      "keepAliveTime":1,
      "maxPendingLimit":65535,
      "maxPoolSize":1024,
      "taskTimeout":1,
      "timeUnit":"MINUTES"
    }
  }
}

默认配置

如果不配置则使用上述的值进行加载

Clone this wiki locally