github.com/polarismesh/polaris@v1.17.8/release/standalone/docker-compose/server/polaris-server.yaml (about) 1 # server启动引导配置 2 bootstrap: 3 # 全局日志 4 logger: 5 config: 6 rotateOutputPath: log/runtime/polaris-config.log 7 errorRotateOutputPath: log/runtime/polaris-config-error.log 8 rotationMaxSize: 100 9 rotationMaxBackups: 10 10 rotationMaxAge: 7 11 outputLevel: info 12 # outputPaths: 13 # - stdout 14 # errorOutputPaths: 15 # - stderr 16 auth: 17 rotateOutputPath: log/runtime/polaris-auth.log 18 errorRotateOutputPath: log/runtime/polaris-auth-error.log 19 rotationMaxSize: 100 20 rotationMaxBackups: 10 21 rotationMaxAge: 7 22 outputLevel: info 23 # outputPaths: 24 # - stdout 25 # errorOutputPaths: 26 # - stderr 27 store: 28 rotateOutputPath: log/runtime/polaris-store.log 29 errorRotateOutputPath: log/runtime/polaris-store-error.log 30 rotationMaxSize: 100 31 rotationMaxBackups: 10 32 rotationMaxAge: 7 33 outputLevel: info 34 # outputPaths: 35 # - stdout 36 # errorOutputPaths: 37 # - stderr 38 cache: 39 rotateOutputPath: log/runtime/polaris-cache.log 40 errorRotateOutputPath: log/runtime/polaris-cache-error.log 41 rotationMaxSize: 100 42 rotationMaxBackups: 10 43 rotationMaxAge: 7 44 outputLevel: info 45 # outputPaths: 46 # - stdout 47 # errorOutputPaths: 48 # - stderr 49 naming: 50 rotateOutputPath: log/runtime/polaris-naming.log 51 errorRotateOutputPath: log/runtime/polaris-naming-error.log 52 rotationMaxSize: 100 53 rotationMaxBackups: 10 54 rotationMaxAge: 7 55 outputLevel: info 56 # outputPaths: 57 # - stdout 58 # errorOutputPaths: 59 # - stderr 60 healthcheck: 61 rotateOutputPath: log/runtime/polaris-healthcheck.log 62 errorRotateOutputPath: log/runtime/polaris-healthcheck-error.log 63 rotationMaxSize: 100 64 rotationMaxBackups: 10 65 rotationMaxAge: 7 66 outputLevel: info 67 # outputPaths: 68 # - stdout 69 # errorOutputPaths: 70 # - stderr 71 xdsv3: 72 rotateOutputPath: log/runtime/polaris-xdsv3.log 73 errorRotateOutputPath: log/polaris-xdsv3-error.log 74 rotationMaxSize: 100 75 rotationMaxBackups: 10 76 rotationMaxAge: 7 77 outputLevel: info 78 # outputPaths: 79 # - stdout 80 # errorOutputPaths: 81 # - stderr 82 apiserver: 83 rotateOutputPath: log/runtime/polaris-apiserver.log 84 errorRotateOutputPath: log/runtime/polaris-apiserver-error.log 85 rotationMaxSize: 100 86 rotationMaxBackups: 10 87 rotationMaxAge: 7 88 outputLevel: info 89 # outputPaths: 90 # - stdout 91 # errorOutputPaths: 92 # - stderr 93 token-bucket: 94 rotateOutputPath: log/runtime/polaris-ratelimit.log 95 errorRotateOutputPath: log/runtime/polaris-ratelimit-error.log 96 rotationMaxSize: 100 97 rotationMaxBackups: 10 98 rotationMaxAge: 7 99 outputLevel: info 100 # outputPaths: 101 # - stdout 102 # errorOutputPaths: 103 # - stderr 104 default: 105 rotateOutputPath: log/runtime/polaris-default.log 106 errorRotateOutputPath: log/runtime/polaris-default-error.log 107 rotationMaxSize: 100 108 rotationMaxBackups: 10 109 rotationMaxAge: 7 110 outputLevel: info 111 # outputPaths: 112 # - stdout 113 # errorOutputPaths: 114 # - stderr 115 discoverEventLocal: 116 rotateOutputPath: log/event/polaris-discoverevent.log 117 errorRotateOutputPath: log/event/polaris-discoverevent-error.log 118 rotationMaxSize: 100 119 rotationMaxBackups: 10 120 rotationMaxAge: 7 121 outputLevel: info 122 # outputPaths: 123 # - stdout 124 # errorOutputPaths: 125 # - stderr 126 discoverLocal: 127 rotateOutputPath: log/statis/polaris-discoverstat.log 128 errorRotateOutputPath: log/statis/polaris-discoverstat-error.log 129 rotationMaxSize: 100 130 rotationMaxBackups: 10 131 rotationMaxAge: 7 132 outputLevel: info 133 # outputPaths: 134 # - stdout 135 # errorOutputPaths: 136 # - stderr 137 local: 138 rotateOutputPath: log/statis/polaris-statis.log 139 errorRotateOutputPath: log/statis/polaris-statis-error.log 140 rotationMaxSize: 100 141 rotationMaxBackups: 10 142 rotationMaxAge: 7 143 outputLevel: info 144 # outputPaths: 145 # - stdout 146 # errorOutputPaths: 147 # - stderr 148 HistoryLogger: 149 rotateOutputPath: log/operation/polaris-history.log 150 errorRotateOutputPath: log/operation/polaris-history-error.log 151 rotationMaxSize: 100 152 rotationMaxBackups: 10 153 rotationMaxAge: 7 154 rotationMaxDurationForHour: 24 155 outputLevel: info 156 logCaller: false 157 # outputPaths: 158 # - stdout 159 # errorOutputPaths: 160 # - stderr 161 # 按顺序启动server 162 startInOrder: 163 open: true # 是否开启,默认是关闭 164 key: sz # 全局锁 165 # 注册为北极星服务 166 polaris_service: 167 probe_address: mysql:3306 168 enable_register: true 169 isolated: false 170 services: 171 - name: polaris.checker 172 protocols: 173 - service-grpc 174 # apiserver配置 175 apiservers: 176 - name: service-eureka 177 option: 178 listenIP: "0.0.0.0" 179 listenPort: 8761 180 namespace: default 181 owner: polaris 182 refreshInterval: 10 183 deltaExpireInterval: 60 184 unhealthyExpireInterval: 180 185 connLimit: 186 openConnLimit: false 187 maxConnPerHost: 1024 188 maxConnLimit: 10240 189 whiteList: 127.0.0.1 190 purgeCounterInterval: 10s 191 purgeCounterExpired: 5s 192 - name: api-http # 协议名,全局唯一 193 option: 194 listenIP: "0.0.0.0" 195 listenPort: 8090 196 enablePprof: true # debug pprof 197 enableSwagger: true # debug pprof 198 connLimit: 199 openConnLimit: false 200 maxConnPerHost: 128 201 maxConnLimit: 5120 202 whiteList: 127.0.0.1 203 purgeCounterInterval: 10s 204 purgeCounterExpired: 5s 205 api: 206 admin: 207 enable: true 208 console: 209 enable: true 210 include: [ default ] 211 client: 212 enable: true 213 include: [ discover, register, healthcheck ] 214 config: 215 enable: true 216 include: [ default ] 217 - name: service-grpc 218 option: 219 listenIP: "0.0.0.0" 220 listenPort: 8091 221 connLimit: 222 openConnLimit: false 223 maxConnPerHost: 128 224 maxConnLimit: 5120 225 enableCacheProto: true 226 sizeCacheProto: 128 227 tls: 228 certFile: "" 229 keyFile: "" 230 trustedCAFile: "" 231 api: 232 client: 233 enable: true 234 include: [ discover, register, healthcheck ] 235 - name: config-grpc 236 option: 237 listenIP: "0.0.0.0" 238 listenPort: 8093 239 connLimit: 240 openConnLimit: false 241 maxConnPerHost: 128 242 maxConnLimit: 5120 243 api: 244 client: 245 enable: true 246 - name: xds-v3 247 option: 248 listenIP: "0.0.0.0" 249 listenPort: 15010 250 connLimit: 251 openConnLimit: false 252 maxConnPerHost: 128 253 maxConnLimit: 10240 254 # - name: service-l5 255 # option: 256 # listenIP: 0.0.0.0 257 # listenPort: 7779 258 # clusterName: cl5.discover 259 # 核心逻辑的配置 260 auth: 261 # auth的option现已迁移至user及strategy 262 # 在auth.option配置依然有效,但是会收到警告,提醒您尽快迁移配置至user及strategy级别下 263 user: 264 name: defaultUser 265 option: 266 # token 加密的 salt,鉴权解析 token 时需要依靠这个 salt 去解密 token 的信息 267 # salt 的长度需要满足以下任意一个:len(salt) in [16, 24, 32] 268 salt: polarismesh@2021 269 strategy: 270 name: defaultStrategy 271 option: 272 # 控制台鉴权能力开关,默认开启 273 consoleOpen: true 274 # 客户端鉴权能力开关, 默认关闭 275 clientOpen: false 276 namespace: 277 # 是否允许自动创建命名空间 278 autoCreate: true 279 naming: 280 auth: 281 open: false 282 # 批量控制器 283 batch: 284 register: 285 open: true 286 queueSize: 10240 287 waitTime: 32ms 288 maxBatchCount: 128 289 concurrency: 128 290 dropExpireTask: true 291 taskLife: 30s 292 deregister: 293 open: true 294 queueSize: 10240 295 waitTime: 32ms 296 maxBatchCount: 128 297 concurrency: 128 298 clientRegister: 299 open: true 300 queueSize: 10240 301 waitTime: 32s 302 maxBatchCount: 1024 303 concurrency: 64 304 clientDeregister: 305 open: true 306 queueSize: 10240 307 waitTime: 32ms 308 maxBatchCount: 32 309 concurrency: 64 310 # 健康检查的配置 311 healthcheck: 312 open: true 313 service: polaris.checker 314 slotNum: 30 315 minCheckInterval: 1s 316 maxCheckInterval: 30s 317 clientReportInterval: 120s 318 batch: 319 heartbeat: 320 open: true 321 queueSize: 10240 322 waitTime: 32ms 323 maxBatchCount: 32 324 concurrency: 64 325 checkers: 326 - name: heartbeatRedis 327 option: 328 kvAddr: redis:6379 329 kvPasswd: polaris 330 poolSize: 200 331 minIdleConns: 30 332 idleTimeout: 120s 333 connectTimeout: 200ms 334 msgTimeout: 200ms 335 concurrency: 200 336 # 配置中心模块启动配置 337 config: 338 # 是否启动配置模块 339 open: true 340 # 缓存配置 341 cache: 342 open: true 343 resources: 344 - name: service # Load service data 345 option: 346 disableBusiness: false # Do not load business services 347 needMeta: true # Load service metadata 348 - name: instance # Load instance data 349 option: 350 disableBusiness: false # Do not load business service examples 351 needMeta: true # Load instance metadata 352 - name: routingConfig # Load route data 353 - name: rateLimitConfig # Load current limit data 354 - name: circuitBreakerConfig # Load the fuse data 355 - name: users # Load user and user group data 356 - name: strategyRule # Loading the rules of appraisal 357 - name: namespace # Load the naming space data 358 - name: client # Load Client-SDK instance data 359 - name: configFile 360 - name: configGroup 361 - name: faultDetectRule 362 # - name: l5 # 加载l5数据 363 # 存储配置 364 store: 365 # 数据库存储插件 366 name: defaultStore 367 option: 368 master: 369 dbType: mysql 370 dbName: polaris_server 371 dbUser: root 372 dbPwd: polaris 373 dbAddr: mysql:3306 374 maxOpenConns: 300 375 maxIdleConns: 50 376 connMaxLifetime: 300 # 单位秒 377 txIsolationLevel: 2 #LevelReadCommitted 378 # 插件配置 379 plugin: 380 history: 381 entries: 382 - name: HistoryLogger 383 crypto: 384 entries: 385 - name: AES 386 discoverEvent: 387 entries: 388 - name: discoverEventLocal 389 discoverStatis: 390 name: discoverLocal 391 option: 392 interval: 60 # 统计间隔,单位为秒 393 outputPath: ./discover-statis 394 statis: 395 entries: 396 - name: local 397 option: 398 interval: 60 399 - name: prometheus 400 ratelimit: 401 name: token-bucket 402 option: 403 remote-conf: false # 是否使用远程配置 404 ip-limit: # ip级限流,全局 405 open: true # 系统是否开启ip级限流 406 global: 407 open: true 408 bucket: 300 # 最高峰值 409 rate: 200 # 平均一个IP每秒的请求数 410 resource-cache-amount: 1024 # 最大缓存的IP个数 411 white-list: [ 127.0.0.1 ] 412 instance-limit: 413 open: true 414 global: 415 bucket: 200 416 rate: 100 417 resource-cache-amount: 1024 418 api-limit: # 接口级限流 419 open: false # 是否开启接口限流,全局开关,只有为true,才代表系统的限流开启。默认关闭 420 rules: 421 - name: store-read 422 limit: 423 open: true # 接口的全局配置,如果在api子项中,不配置,则该接口依据global来做限制 424 bucket: 2000 # 令牌桶最大值 425 rate: 1000 # 每秒产生的令牌数 426 - name: store-write 427 limit: 428 open: true 429 bucket: 1000 430 rate: 500 431 apis: 432 - name: "POST:/v1/naming/services" 433 rule: store-write 434 - name: "PUT:/v1/naming/services" 435 rule: store-write 436 - name: "POST:/v1/naming/services/delete" 437 rule: store-write 438 - name: "GET:/v1/naming/services" 439 rule: store-read 440 - name: "GET:/v1/naming/services/count" 441 rule: store-read