properties-system

更新时间:
复制 MD 格式

Key-value pairs in application.properties are mainly divided into the following two types:

  • System Configurations: Key-value pairs defined by the SOFABoot framework that control framework behavior.

  • Custom Configurations: Key-value pairs defined and used by developers in application code. These configurations do not affect the SOFABoot framework; their semantics and usage are entirely determined by users.

This article lists all the system configuration items that support configuration in config/application.properties.

SOFABoot system configuration items

Default configuration items

The following table lists the default system configuration items:

Configuration Items

Type

Description

Default value

Valid value

spring.application.name

STRING

The application name.

No

This parameter is required.

A string that consists of a to z lowercase letters and "-". It does not contain any other symbols. such as helloworld and hello-world.

logging.path

STRING

The log output directory of the SOFA framework and each middleware.

./logs

A string that represents the directory.

  • Support for relative paths, such as ./logs;

  • Absolute paths, such as /home/admin/logs, are supported.

logging.level.${groupId}

STRING

The log level of the business application created using the engineering prototype.

INFO

Indicates the log printing level of the business application. The following values can be configured:

  • INFO: indicates the basic information log;

  • WARN: indicates warning log;

  • DEBUG: indicates a debug log.

  • ERROR: indicates error log.

RPC configuration items

The following table lists the system configuration items related to RPC:

configuration items

Type

configuration items description

Default Value

Value Range

run.mode

STRING

The RPC routing mode.

Empty

  • DEV: indicates that when RPC routing, the local mode is forced (both the client and the server are on the same machine);

  • TEST: indicates that when RPC routing, the address specified by the test-url parameter is forced (point-to-point connection);

  • NORMAL: indicates that when RPC routing is used, routing with soft load is also the correct mode for online.

rpc.sofarouter

BOOLEAN

Specifies whether to enable SOFARouter.

true (version 1.0.0);

false(1.1.0 to 2.1.4).

  • true: enables SOFARouter.

  • false: disables SOFARouter.

rpc.reference.duplicate.limit

INTEGER

Threshold at which an exception is thrown if RPC references the same service more than once.

3

A positive integer, such as 5.

rpc.min.pool.size.tr

INTEGER

The minimum number of threads in the server thread pool.

20

A positive integer, such as 100.

rpc.max.pool.size.tr

INTEGER

The maximum number of threads in the thread pool of the TR server.

200

A positive integer, such as 600.

rpc.pool.queue.size.tr

INTEGER

TR server thread pool queue size.

0

A positive integer, such as 2000.

rpc.tr.port

INTEGER

TR port number

12200

A positive integer, such as 12201.

rpc.transmit.url.timeout.tr

INTEGER

The timeout period of the warm-up call. Unit: milliseconds.

10000

A positive integer, such as 10000.

rpc.tr.reconnect.period

INTEGER

The interval at which the TR client automatically reconnects to the disconnected server. Unit: milliseconds.

10000

A positive integer, such as 20000.

In addition, you must set the following RPC system configuration items together with JVM parameters. For more information, see Technology stack usage guide.

configuration items

Type

Description

Default Value

Value Range

rpc_bind_network_interface

STRING

The server is bound to a fixed network interface controller.

Empty. In this case, the first one is taken from the list of available network interface controller.

The name of the network interface controller obtained by ifconfig, such as eth0.

rpc_enabled_ip_range

STRING

The server is bound to a local IP range.

Empty. In this case, the first one is taken from the list of available network interface controller.

Format: IP_RANGE1:IP_RANGE2,IP_RANGE. For example, rpc_enabled_ip_range=10.1:10.2,11 indicates that the destination address is selected from the IP segments 10.1.0.0 to 10.2.255.255 and 11.0.0.0 to 11.255.255.255 during RPC routing.

rpc.transmit.url

STRING

Warm-up forwarding and weight configuration.

Empty

  • Format 1: 127.0.0.1, that is, the legal forwarding target URL;

  • Format 2: weightStarting:0.3,during:60,weightStarted:0.2,address:127.0.0.1,uniqueId:core_unique, which contains the warm-up period forwarding weight, warm-up time, forwarding weight after warm-up, destination address, and cluster identifier.

core_unique

STRING

This parameter is used only to identify the target cluster for preload forwarding.

Empty

A custom string, such as abc.

Tracer configuration items

The following table lists the system configuration items related to Tracer:

configuration items

Type

Description

Default Value

Value Range

logging.path

STRING

The log output directory.

Tracer will preferentially output to the logging.path directory; If no log output directory is configured, the default output is to the ${user.home}.

The correct log path.

com.alipay.sofa.tracer.tracerGlobalRollingPolicy

STRING

The scrolling policy of tracer logs.

By default, scrolling by day is not configured.

  • yyyy-MM-dd: scroll by day;

  • yyyy-MM-dd_HH: Scrolls by the hour.

com.alipay.sofa.tracer.tracerGlobalLogReserveDay

INTEGER

The retention period of tracer logs.

7 days by default

A positive integer, such as 8 and 9.

com.alipay.sofa.tracer.statLogInterval

INTEGER

The interval at which logs are collected.

By default, statistical logs are output once every 60 seconds.

A positive integer. Unit: seconds.

com.alipay.sofa.tracer.baggageMaxLength

INTEGER

The maximum length of passthrough data that can be stored.

1024

A positive integer.

com.alipay.sofa.tracer.disableDigestLog

BOOLEAN

Specifies whether to disable summary log printing for all integrated tracer components.

false

  • true: disabled.

  • false: enabled .

com.alipay.sofa.tracer.disableConfiguration[${logType}]

BOOLEAN

Specifies whether to disable the printing of SOFATracer component summary logs for the specified ${logType}. ${logType} refers to the specific log type, such as spring-mvc-digest.log。

false

  • true: disabled.

  • false: enabled.

SOFABoot health check configuration items

configuration items

Type

Description

Default Value

Value Range

com.alipay.sofa.healthcheck.skip.all

BOOLEAN

Whether to skip the entire self-test phase.

false

  • true: skips the entire self-test phase.

  • false: does not skip the entire self-test phase.

com.alipay.sofa.healthcheck.skip.component

BOOLEAN

Whether to skip the self-test of the component.

false

  • true: The self-test of the component is skipped.

  • false: does not skip the self-test of the component.

com.alipay.sofa.healthcheck.skip.indicator

BOOLEAN

Whether to skip the health check self-test of the HealthIndicator.

false

  • true: skips the HealthIndicator health check self-check.

  • false: does not skip the health check self-check of the HealthIndicator.

com.alipay.sofa.healthcheck.component.check.retry.count

INTEGER

The number of failed retries for the self-check of the traffic ingress component. If the number of retries exceeds this value, the health check is no longer performed and the service cannot be started.

20

A positive integer, such as 12.

com.alipay.sofa.healthcheck.component.check.strict.enabled

BOOLEAN

Specifies whether to perform a strict component self-test on the traffic inlet component.

true

  • true: performs a strict component self-test on the traffic ingress component.

  • false: The health check result of the traffic ingress component is successful.

Java startup parameter settings (configured with the -D parameter at startup):

configuration items

Default Value

Description

rpc_max_address_wait_time

3000

The waiting time for the configuration center to return the address. Unit: milliseconds.

rpc_tr_heart_beat_interval

27

The heartbeat gap of the TR. Unit: seconds.