197 lines
8.1 KiB
Plaintext
197 lines
8.1 KiB
Plaintext
#*************** Spring Boot Related Configurations ***************#
|
||
### Default web context path:
|
||
server.servlet.contextPath=/nacos
|
||
### Default web server port:
|
||
server.port=8848
|
||
|
||
#*************** Network Related Configurations ***************#
|
||
### If prefer hostname over ip for Nacos server addresses in cluster.conf:
|
||
# nacos.inetutils.prefer-hostname-over-ip=false
|
||
|
||
### Specify local server's IP:
|
||
# nacos.inetutils.ip-address=
|
||
|
||
|
||
#*************** Core Related Configurations ***************#
|
||
### set the WorkerID manually
|
||
# nacos.core.snowflake.worker-id=
|
||
|
||
### Member-MetaData
|
||
# nacos.core.member.meta.site=
|
||
# nacos.core.member.meta.adweight=
|
||
# nacos.core.member.meta.weight=
|
||
|
||
### MemberLookup
|
||
### Addressing pattern category, If set, the priority is highest
|
||
# nacos.core.member.lookup.type=[file,address-server,discovery]
|
||
## Set the cluster list with a configuration file or command-line argument
|
||
# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
|
||
## for DiscoveryMemberLookup
|
||
# If you want to use cluster node self-discovery, turn this parameter on
|
||
# nacos.member.discovery=false
|
||
## for AddressServerMemberLookup
|
||
# Maximum number of retries to query the address server upon initialization
|
||
# nacos.core.address-server.retry=5
|
||
|
||
#*************** Config Module Related Configurations ***************#
|
||
### If user MySQL as datasource:
|
||
spring.datasource.platform=mysql
|
||
|
||
### Count of DB:
|
||
# db.num=1
|
||
|
||
### Connect URL of DB:
|
||
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||
db.user=root
|
||
db.password=1017
|
||
|
||
|
||
#*************** Naming Module Related Configurations ***************#
|
||
### Data dispatch task execution period in milliseconds:
|
||
# nacos.naming.distro.taskDispatchPeriod=200
|
||
|
||
### Data count of batch sync task:
|
||
# nacos.naming.distro.batchSyncKeyCount=1000
|
||
|
||
### Retry delay in milliseconds if sync task failed:
|
||
# nacos.naming.distro.syncRetryDelay=5000
|
||
|
||
### If enable data warmup. If set to false, the server would accept request without local data preparation:
|
||
# nacos.naming.data.warmup=true
|
||
|
||
### If enable the instance auto expiration, kind like of health check of instance:
|
||
# nacos.naming.expireInstance=true
|
||
|
||
nacos.naming.empty-service.auto-clean=true
|
||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||
nacos.naming.empty-service.clean.period-time-ms=30000
|
||
|
||
|
||
#*************** CMDB Module Related Configurations ***************#
|
||
### The interval to dump external CMDB in seconds:
|
||
# nacos.cmdb.dumpTaskInterval=3600
|
||
|
||
### The interval of polling data change event in seconds:
|
||
# nacos.cmdb.eventTaskInterval=10
|
||
|
||
### The interval of loading labels in seconds:
|
||
# nacos.cmdb.labelTaskInterval=300
|
||
|
||
### If turn on data loading task:
|
||
# nacos.cmdb.loadDataAtStart=false
|
||
|
||
|
||
#*************** Metrics Related Configurations ***************#
|
||
### Metrics for prometheus
|
||
#management.endpoints.web.exposure.include=*
|
||
|
||
### Metrics for elastic search
|
||
management.metrics.export.elastic.enabled=false
|
||
#management.metrics.export.elastic.host=http://localhost:9200
|
||
|
||
### Metrics for influx
|
||
management.metrics.export.influx.enabled=false
|
||
#management.metrics.export.influx.db=springboot
|
||
#management.metrics.export.influx.uri=http://localhost:8086
|
||
#management.metrics.export.influx.auto-create-db=true
|
||
#management.metrics.export.influx.consistency=one
|
||
#management.metrics.export.influx.compressed=true
|
||
|
||
|
||
#*************** Access Log Related Configurations ***************#
|
||
### If turn on the access log:
|
||
server.tomcat.accesslog.enabled=true
|
||
|
||
### The access log pattern:
|
||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i
|
||
|
||
### The directory of access log:
|
||
server.tomcat.basedir=
|
||
|
||
|
||
#*************** Access Control Related Configurations ***************#
|
||
### If enable spring security, this option is deprecated in 1.2.0:
|
||
#spring.security.enabled=false
|
||
|
||
### The ignore urls of auth, is deprecated in 1.2.0:
|
||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||
|
||
### The auth system to use, currently only 'nacos' is supported:
|
||
nacos.core.auth.system.type=nacos
|
||
|
||
### If turn on auth system:
|
||
nacos.core.auth.enabled=true
|
||
|
||
### The token expiration in seconds:
|
||
nacos.core.auth.default.token.expire.seconds=18000
|
||
|
||
### The default token:
|
||
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||
|
||
### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
|
||
nacos.core.auth.caching.enabled=true
|
||
|
||
|
||
#*************** Istio Related Configurations ***************#
|
||
### If turn on the MCP server:
|
||
nacos.istio.mcp.server.enabled=false
|
||
|
||
#*************** Consistency Related Configurations ***************#
|
||
|
||
# About Raft
|
||
|
||
### Sets the Raft cluster election timeout, default value is 5 second
|
||
nacos.core.protocol.raft.data.election_timeout_ms=5000
|
||
### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
|
||
nacos.core.protocol.raft.data.snapshot_interval_secs=30
|
||
### Requested retries, default value is 1
|
||
nacos.core.protocol.raft.data.request_failoverRetries=1
|
||
### raft internal worker threads
|
||
nacos.core.protocol.raft.data.core_thread_num=8
|
||
### Number of threads required for raft business request processing
|
||
nacos.core.protocol.raft.data.cli_service_thread_num=4
|
||
### raft linear read strategy, defaults to index
|
||
nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
|
||
### rpc request timeout, default 5 seconds
|
||
nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000
|
||
### Maximum size of each file RPC (snapshot copy) request between members, default is 128 K
|
||
nacos.core.protocol.raft.data.max_byte_count_per_rpc=131072
|
||
### Maximum number of logs sent from leader to follower, default is 1024
|
||
nacos.core.protocol.raft.data.max_entries_size=1024
|
||
### Maximum body size for sending logs from leader to follower, default is 512K
|
||
nacos.core.protocol.raft.data.max_body_size=524288
|
||
### Maximum log storage buffer size, default 256K
|
||
nacos.core.protocol.raft.data.max_append_buffer_size=262144
|
||
### Election timer interval will be a random maximum outside the specified time, default is 1 second
|
||
nacos.core.protocol.raft.data.max_election_delay_ms=1000
|
||
### Specify the ratio between election timeout and heartbeat interval. Heartbeat interval is equal to
|
||
### electionTimeoutMs/electionHeartbeatFactor,One tenth by default.
|
||
nacos.core.protocol.raft.data.election_heartbeat_factor=10
|
||
### The tasks submitted to the leader accumulate the maximum batch size of a batch flush log storage. The default is 32 tasks.
|
||
nacos.core.protocol.raft.data.apply_batch=32
|
||
### Call fsync when necessary when writing logs and meta information, usually should be true
|
||
nacos.core.protocol.raft.data.sync=true
|
||
### Whether to write snapshot / raft meta-information to call fsync. The default is false. When sync is true, it is preferred to respect sync.
|
||
nacos.core.protocol.raft.data.sync_meta=false
|
||
### Internal disruptor buffer size. For applications with high write throughput, you need to increase this value. The default value is 16384.
|
||
nacos.core.protocol.raft.data.disruptor_buffer_size=16384
|
||
### Whether to enable replication of pipeline request optimization, which is enabled by default
|
||
nacos.core.protocol.raft.data.replicator_pipeline=true
|
||
### Maximum number of in-flight requests with pipeline requests enabled, default is 256
|
||
nacos.core.protocol.raft.data.max_replicator_inflight_msgs=256
|
||
### Whether to enable LogEntry checksum
|
||
nacos.core.protocol.raft.data.enable_log_entry_checksum=false
|
||
|
||
# About Distro
|
||
|
||
### Maximum interval between two data transmissions
|
||
nacos.core.protocol.distro.data.task_dispatch_period_ms=2000
|
||
### Number of keys per batch of tasks
|
||
nacos.core.protocol.distro.data.batch_sync_key_count=1000
|
||
### Task retry delay time
|
||
nacos.core.protocol.distro.data.sync_retry_delay_ms=5000
|
||
### Whether to enable the authoritative server mechanism
|
||
nacos.core.protocol.distro.data.distro_enabled=true
|
||
### Data synchronization retry strategy
|
||
nacos.core.protocol.distro.data.retry_policy=simple
|