github.com/polarismesh/polaris@v1.17.8/release/conf/polaris-server.yaml (about) 1 # Tencent is pleased to support the open source community by making Polaris available. 2 # 3 # Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 # 5 # Licensed under the BSD 3-Clause License (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # https://opensource.org/licenses/BSD-3-Clause 10 # 11 # Unless required by applicable law or agreed to in writing, software distributed 12 # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 13 # CONDITIONS OF ANY KIND, either express or implied. See the License for the 14 # specific language governing permissions and limitations under the License. 15 16 # server Start guidance configuration 17 bootstrap: 18 # Global log 19 logger: 20 # Log scope name 21 # Configuration center related logs 22 config: 23 # Log file location 24 rotateOutputPath: log/runtime/polaris-config.log 25 # Special records of error log files at ERROR level 26 errorRotateOutputPath: log/runtime/polaris-config-error.log 27 # The maximum size of a single log file, 100 default, the unit is MB 28 rotationMaxSize: 100 29 # How many log files are saved, default 30 30 rotationMaxBackups: 30 31 # The maximum preservation days of a single log file, default 7 32 rotationMaxAge: 7 33 # Log output level,debug/info/warn/error 34 outputLevel: info 35 # Open the log file compression 36 compress: true 37 # onlyContent just print log content, not print log timestamp 38 # onlyContent: false 39 # Resource Auth, User Management Log 40 auth: 41 rotateOutputPath: log/runtime/polaris-auth.log 42 errorRotateOutputPath: log/runtime/polaris-auth-error.log 43 rotationMaxSize: 100 44 rotationMaxBackups: 30 45 rotationMaxAge: 7 46 outputLevel: info 47 compress: true 48 # Storage layer log 49 store: 50 rotateOutputPath: log/runtime/polaris-store.log 51 errorRotateOutputPath: log/runtime/polaris-store-error.log 52 rotationMaxSize: 100 53 rotationMaxBackups: 30 54 rotationMaxAge: 7 55 outputLevel: info 56 compress: true 57 # Server cache log log 58 cache: 59 rotateOutputPath: log/runtime/polaris-cache.log 60 errorRotateOutputPath: log/runtime/polaris-cache-error.log 61 rotationMaxSize: 100 62 rotationMaxBackups: 30 63 rotationMaxAge: 7 64 outputLevel: info 65 compress: true 66 # Service discovery and governance rules related logs 67 naming: 68 rotateOutputPath: log/runtime/polaris-naming.log 69 errorRotateOutputPath: log/runtime/polaris-naming-error.log 70 rotationMaxSize: 100 71 rotationMaxBackups: 30 72 rotationMaxAge: 7 73 outputLevel: info 74 compress: true 75 # Service discovery institutional health check log 76 healthcheck: 77 rotateOutputPath: log/runtime/polaris-healthcheck.log 78 errorRotateOutputPath: log/runtime/polaris-healthcheck-error.log 79 rotationMaxSize: 100 80 rotationMaxBackups: 30 81 rotationMaxAge: 7 82 outputLevel: info 83 compress: true 84 # XDS protocol layer plug -in log 85 xdsv3: 86 rotateOutputPath: log/runtime/polaris-xdsv3.log 87 errorRotateOutputPath: log/runtime/polaris-xdsv3-error.log 88 rotationMaxSize: 100 89 rotationMaxBackups: 30 90 rotationMaxAge: 7 91 outputLevel: info 92 compress: true 93 # Eureka protocol layer plug -in log 94 eureka: 95 rotateOutputPath: log/runtime/polaris-eureka.log 96 errorRotateOutputPath: log/runtime/polaris-eureka-error.log 97 rotationMaxSize: 100 98 rotationMaxBackups: 30 99 rotationMaxAge: 7 100 outputLevel: info 101 compress: true 102 # APISERVER common log, record inbound request and outbound response 103 apiserver: 104 rotateOutputPath: log/runtime/polaris-apiserver.log 105 errorRotateOutputPath: log/runtime/polaris-apiserver-error.log 106 rotationMaxSize: 100 107 rotationMaxBackups: 30 108 rotationMaxAge: 7 109 outputLevel: info 110 compress: true 111 default: 112 rotateOutputPath: log/runtime/polaris-default.log 113 errorRotateOutputPath: log/runtime/polaris-default-error.log 114 rotationMaxSize: 100 115 rotationMaxBackups: 30 116 rotationMaxAge: 7 117 outputLevel: info 118 compress: true 119 # server plugin logs 120 token-bucket: 121 rotateOutputPath: log/runtime/polaris-ratelimit.log 122 errorRotateOutputPath: log/runtime/polaris-ratelimit-error.log 123 rotationMaxSize: 100 124 rotationMaxBackups: 30 125 rotationMaxAge: 7 126 outputLevel: info 127 compress: true 128 discoverLocal: 129 rotateOutputPath: log/statis/polaris-discoverstat.log 130 errorRotateOutputPath: log/statis/polaris-discoverstat-error.log 131 rotationMaxSize: 100 132 rotationMaxBackups: 30 133 rotationMaxAge: 7 134 outputLevel: info 135 compress: true 136 local: 137 rotateOutputPath: log/statis/polaris-statis.log 138 errorRotateOutputPath: log/statis/polaris-statis-error.log 139 rotationMaxSize: 100 140 rotationMaxBackups: 30 141 rotationMaxAge: 7 142 outputLevel: info 143 compress: true 144 HistoryLogger: 145 rotateOutputPath: log/operation/polaris-history.log 146 errorRotateOutputPath: log/operation/polaris-history-error.log 147 rotationMaxSize: 100 148 rotationMaxBackups: 10 149 rotationMaxAge: 7 150 rotationMaxDurationForHour: 24 151 outputLevel: info 152 onlyContent: true 153 discoverEventLocal: 154 rotateOutputPath: log/event/polaris-discoverevent.log 155 errorRotateOutputPath: log/event/polaris-discoverevent-error.log 156 rotationMaxSize: 100 157 rotationMaxBackups: 30 158 rotationMaxAge: 7 159 outputLevel: info 160 onlyContent: true 161 cmdb: 162 rotateOutputPath: log/runtime/polaris-cmdb.log 163 errorRotateOutputPath: log/runtime/polaris-cmdb-error.log 164 rotationMaxSize: 100 165 rotationMaxBackups: 30 166 rotationMaxAge: 7 167 outputLevel: info 168 compress: true 169 # Start the server in order 170 startInOrder: 171 # Start the Polaris-Server in order, mainly to avoid data synchronization logic when the server starts the DB to pull the DB out of high load 172 open: true 173 # The name of the start lock 174 key: sz 175 # Register as Arctic Star Service 176 polaris_service: 177 ## level: self_address > network_inter > probe_address 178 ## Obtain the IP of the VM or POD where Polaris is located by making a TCP connection with the probe_adreess address 179 probe_address: ##DB_ADDR## 180 ## Set the name of the gateway to get your own IP 181 # network_inter: eth0 182 ## Show the setting node itself IP information 183 # self_address: 127.0.0.1 184 # disable_heartbeat disable polaris_server node run heartbeat action to keep lease polaris_service 185 # disable_heartbeat: true 186 # Whether to open the server to register 187 enable_register: true 188 # Registered North Star Server Examples isolation status 189 isolated: false 190 # Service information that needs to be registered 191 services: 192 # service name 193 - name: polaris.checker 194 # Set the port protocol information that requires registration 195 protocols: 196 - service-grpc 197 # apiserver Configuration 198 apiservers: 199 # apiserver plugin name 200 - name: service-eureka 201 # apiserver additional configuration 202 option: 203 # tcp server listen ip 204 listenIP: "0.0.0.0" 205 # tcp server listen port 206 listenPort: 8761 207 # set the polaris namingspace of the EUREKA service default 208 namespace: default 209 # pull data from the cache of the polaris, refresh the data cache in the Eureka protocol 210 refreshInterval: 10 211 # eureka incremental instance changes time cache expiration cycle 212 deltaExpireInterval: 60 213 # unhealthy instance expiration cycle 214 unhealthyExpireInterval: 180 215 # whether to enable an instance ID of polaris to generate logic 216 generateUniqueInstId: false 217 # TCP connection number limit 218 connLimit: 219 # Whether to turn on the TCP connection limit function, default FALSE 220 openConnLimit: false 221 # The number of connections with the most IP 222 maxConnPerHost: 1024 223 # Current Listener's maximum number of connections 224 maxConnLimit: 10240 225 # Whitening list ip list, English comma separation 226 whiteList: 127.0.0.1 227 # Cleaning the cycle of link behavior 228 purgeCounterInterval: 10s 229 # How long does the unpretentious link clean up 230 purgeCounterExpired: 5s 231 - name: api-http 232 option: 233 listenIP: "0.0.0.0" 234 listenPort: 8090 235 # debug pprof switch 236 enablePprof: true 237 # swagger docs switch 238 enableSwagger: true 239 connLimit: 240 openConnLimit: false 241 maxConnPerHost: 128 242 maxConnLimit: 5120 243 whiteList: 127.0.0.1 244 purgeCounterInterval: 10s 245 purgeCounterExpired: 5s 246 # Set the type of open API interface 247 api: 248 # admin OpenAPI interface 249 admin: 250 enable: true 251 # Console OpenAPI interface 252 console: 253 enable: true 254 # OpenAPI group that needs to be exposed 255 include: [default, service, config] 256 # client OpenAPI interface 257 client: 258 enable: true 259 include: [discover, register, healthcheck, config] 260 # Polaris is a client protocol layer based on the gRPC protocol, which is used for registration discovery and service governance rule delivery 261 - name: service-grpc 262 option: 263 listenIP: "0.0.0.0" 264 listenPort: 8091 265 connLimit: 266 openConnLimit: false 267 maxConnPerHost: 128 268 maxConnLimit: 5120 269 # Open the protobuf parsing cache, cache the protobuf serialization results of the same content, and improve the processing of service discovery QPS 270 enableCacheProto: true 271 # Cache default size 272 sizeCacheProto: 128 273 # tls setting 274 tls: 275 # set cert file path 276 certFile: "" 277 # set key file path 278 keyFile: "" 279 # set trusted ca file path 280 trustedCAFile: "" 281 api: 282 client: 283 enable: true 284 include: [discover, register, healthcheck] 285 - name: config-grpc 286 option: 287 listenIP: "0.0.0.0" 288 listenPort: 8093 289 connLimit: 290 openConnLimit: false 291 maxConnPerHost: 128 292 maxConnLimit: 5120 293 api: 294 client: 295 enable: true 296 - name: xds-v3 297 option: 298 listenIP: "0.0.0.0" 299 listenPort: 15010 300 connLimit: 301 openConnLimit: false 302 maxConnPerHost: 128 303 maxConnLimit: 10240 304 # - name: service-l5 305 # option: 306 # listenIP: 0.0.0.0 307 # listenPort: 7779 308 # clusterName: cl5.discover 309 # Core logic configuration 310 auth: 311 # auth's option has migrated to auth.user and auth.strategy 312 # it's still available when filling auth.option, but you will receive warning log that auth.option has deprecated. 313 user: 314 name: defaultUser 315 option: 316 # Token encrypted SALT, you need to rely on this SALT to decrypt the information of the Token when analyzing the Token 317 # The length of SALT needs to satisfy the following one:len(salt) in [16, 24, 32] 318 salt: polarismesh@2021 319 strategy: 320 name: defaultStrategy 321 option: 322 # Console auth switch, default true 323 consoleOpen: true 324 # Console Strict Model, default true 325 consoleStrict: true 326 # Customer auth switch, default false 327 clientOpen: false 328 # Customer Strict Model, default close 329 clientStrict: false 330 namespace: 331 # Whether to allow automatic creation of naming space 332 autoCreate: true 333 naming: 334 # Batch controller 335 batch: 336 register: 337 open: true 338 # Task queue cache 339 queueSize: 10240 340 # The maximum waiting time for the number of mission is not full, and the time is directly forced to launch the BATCH operation 341 waitTime: 32ms 342 # Number of BATCH 343 maxBatchCount: 128 344 # Number of workers in the batch task 345 concurrency: 128 346 # Whether to turn on the discarding expiration task is only used for the batch controller of the register type 347 dropExpireTask: true 348 # The maximum validity period of the task is that the task is not executed when the validity period exceeds the validity period. 349 taskLife: 30s 350 deregister: 351 open: true 352 queueSize: 10240 353 waitTime: 32ms 354 maxBatchCount: 128 355 concurrency: 128 356 # Configuration of health check 357 healthcheck: 358 # Whether to open the health check function module 359 open: true 360 # The service of the instance of the health inspection task 361 service: polaris.checker 362 # Time wheel parameters 363 slotNum: 30 364 # It is used to adjust the next execution time of instance health check tasks in the time wheel, limit the minimum inspection cycle 365 minCheckInterval: 1s 366 # It is used to adjust the next execution time of instance health inspection tasks in the time wheel, limit the maximum inspection cycle 367 maxCheckInterval: 30s 368 # Used to adjust the next execution time of SDK reporting instance health checking tasks in the time wheel 369 clientReportInterval: 120s 370 batch: 371 heartbeat: 372 open: true 373 queueSize: 10240 374 waitTime: 32ms 375 maxBatchCount: 32 376 concurrency: 64 377 # Health check plugin list, currently supports heartBeatMemory/heartBeatredis/heartBeatLeader. 378 # since the three belong to the same type of health check plugin, only one can be enabled to use one 379 checkers: 380 - name: heartbeatMemory 381 # - name: heartbeatLeader # Heartbeat examination plugin based on the Leader-Follower mechanism 382 # option: 383 # # Heartbeat Record MAP number of shards 384 # soltNum: 128 385 # # The number of GRPC connections used to process heartbeat forward request processing between leader and follower, default value is runtime.GOMAXPROCS(0) 386 # streamNum: 128 387 # batch: 388 # # Heartbeat forwarding processing task cache queue 389 # queueSize: 16384 390 # # The maximum waiting time for task batch 391 # waitTime: 32ms 392 # # The maximum number of heartbeat forwarding tasks of single -batch tasks 393 # maxBatchCount: 64 394 # # Number of workers 395 # concurrency: 512 396 # - name: heartbeatRedis # Heartbeat examination plugin based on redis implementation 397 # option: 398 # # Redis connection address, EG: 127.0.0.1:6379 399 # kvAddr: ##REDIS_ADDR## 400 # # ACL user from redis v6.0, remove it if ACL is not available 401 # kvUser: ##REDIS_USER# 402 # # Redis connection password 403 # kvPasswd: ##REDIS_PWD## 404 # # Redis connecting pool 405 # poolSize: 200 406 # # Redis free connection to minimum quantity 407 # minIdleConns: 30 408 # # Redis connect to the maximum free time 409 # idleTimeout: 120s 410 # # Redis connection timeout time 411 # connectTimeout: 200ms 412 # msgTimeout: 200ms # redis Single request timeout time 413 # concurrency: 200 # redis Working Council Pool size 414 # withTLS: false # Whether to turn on TLS, close the default 415 # Configuration center module start configuration 416 config: 417 # Whether to start the configuration module 418 open: true 419 # Maximum number of number of file characters 420 contentMaxLength: 20000 421 # Cache configuration 422 cache: 423 open: true 424 resources: 425 - name: service # Load service data 426 option: 427 disableBusiness: false # Do not load business services 428 needMeta: true # Load service metadata 429 - name: instance # Load instance data 430 option: 431 disableBusiness: false # Do not load business service examples 432 needMeta: true # Load instance metadata 433 - name: routingConfig # Load route data 434 - name: rateLimitConfig # Load current limit data 435 - name: circuitBreakerConfig # Load the fuse data 436 - name: users # Load user and user group data 437 - name: strategyRule # Loading the rules of appraisal 438 - name: namespace # Load the naming space data 439 # Load Client-SDK instance data 440 - name: client 441 - name: configFile 442 - name: configGroup 443 - name: faultDetectRule 444 # - name: l5 # Load L5 data 445 # Maintain configuration 446 maintain: 447 jobs: 448 # Clean up long term unhealthy instance 449 - name: DeleteUnHealthyInstance 450 enable: false 451 option: 452 # Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". 453 instanceDeleteTimeout: 60m 454 # Delete auto-created service without an instance 455 - name: DeleteEmptyAutoCreatedService 456 enable: false 457 option: 458 # Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". 459 serviceDeleteTimeout: 30m 460 # Clean soft deleted instances 461 - name: CleanDeletedInstances 462 enable: true 463 option: 464 # Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". 465 # instanceCleanTimeout: 10m 466 # Clean soft deleted clients 467 - name: CleanDeletedClients 468 enable: true 469 option: 470 # Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". 471 # clientCleanTimeout: 10m 472 473 # Storage configuration 474 store: 475 # Standalone file storage plugin 476 name: boltdbStore 477 option: 478 path: ./polaris.bolt 479 ## Database storage plugin 480 # name: defaultStore 481 # option: 482 # master: 483 # dbType: mysql 484 # dbName: polaris_server 485 # dbUser: ##DB_USER## 486 # dbPwd: ##DB_PWD## 487 # dbAddr: ##DB_ADDR## 488 # maxOpenConns: 300 489 # maxIdleConns: 50 490 # connMaxLifetime: 300 # Unit second 491 # txIsolationLevel: 2 #LevelReadCommitted 492 # polaris-server plugin settings 493 plugin: 494 crypto: 495 entries: 496 - name: AES 497 # whitelist: 498 # name: whitelist 499 # option: 500 # ip: [127.0.0.1] 501 cmdb: 502 name: memory 503 option: 504 url: "" 505 interval: 60s 506 history: 507 entries: 508 - name: HistoryLogger 509 discoverEvent: 510 entries: 511 - name: discoverEventLocal 512 discoverStatis: 513 name: discoverLocal 514 option: 515 # Statistical interval, the unit is second 516 interval: 60 517 statis: 518 entries: 519 - name: local 520 option: 521 interval: 60 522 - name: prometheus 523 ratelimit: 524 name: token-bucket 525 option: 526 # Whether to use remote configuration 527 remote-conf: false 528 # IP -level current, global 529 ip-limit: 530 # Whether the system opens IP -level current limit 531 open: false 532 global: 533 open: false 534 # Maximum peak 535 bucket: 300 536 # The average number of requests per second of IP 537 rate: 200 538 # Number of IP of the maximum cache 539 resource-cache-amount: 1024 540 white-list: [127.0.0.1] 541 instance-limit: 542 open: false 543 global: 544 bucket: 200 545 rate: 100 546 resource-cache-amount: 1024 547 # Interface-level ratelimit limit 548 api-limit: 549 # Whether to turn on the interface restriction and global switch, only for TRUE can it represent the flow restriction on the system.By default 550 open: false 551 rules: 552 - name: store-read 553 limit: 554 # The global configuration of the interface, if in the API sub -item, is not configured, the interface will be limited according to Global 555 open: false 556 # The maximum value of token barrels 557 bucket: 2000 558 # The number of token generated per second 559 rate: 1000 560 - name: store-write 561 limit: 562 open: false 563 bucket: 1000 564 rate: 500 565 apis: 566 - name: "POST:/v1/naming/services" 567 rule: store-write 568 - name: "PUT:/v1/naming/services" 569 rule: store-write 570 - name: "POST:/v1/naming/services/delete" 571 rule: store-write 572 - name: "GET:/v1/naming/services" 573 rule: store-read 574 - name: "GET:/v1/naming/services/count" 575 rule: store-read