This topic describes how to configure Java Virtual Machine (JVM) -D startup parameters when developing High-speed Service Framework (HSF) applications.
Specify the service port for HSF startup
-Dhsf.server.port The default value is 12200. Modify this parameter if you want to start multiple HSF providers in an on-premises environment.
Specify the maximum thread pool size for the HSF provider
-Dhsf.server.max.poolsize The default value is 720.
Specify the minimum thread pool size for the HSF provider
-Dhsf.server.min.poolsize The default value is 50.
Enable or disable local call priority
-Dhsf.client.localcall The default value is true.
Specify the Pandora monitoring port
-Dpandora.qos.port The default value is 12201. Modify this parameter if you want to start multiple HSF providers in an on-premises environment.
Enable or disable the HTTP port
-Dhsf.http.enable The default value is true.
Specify the HTTP interface exposed by HSF
-Dhsf.http.port The default value is 12220. Modify this parameter if you want to start multiple HSF providers in an on-premises environment.
Specify whether the HSF client can make targeted calls that bypass ConfigServer
-Dhsf.run.mode The value 1 indicates that targeted calls are not allowed, while the value 0 indicates that targeted calls are allowed. The default value is 1. We recommend that you do not set this parameter to 0.
Specify the wait time for HSF graceful shutdown
-Dhsf.shuthook.wait Unit: milliseconds. The default value is 10000.
Specify whether all services need delayed publishing
-Dhsf.publish.delayed The default value is false, which indicates that delayed publishing is not required.
Specify the IP address to bind
-Dhsf.server.ip When multiple network interface cards (NICs) exist, the HSF provider binds to the first NIC by default. You can use this parameter to specify the IP address to bind.
Specify the host to bind
-DHsfBindHost When multiple NICs exist, the HSF provider binds to the IP address of the first NIC and reports this IP address to the address registry by default. You can use this parameter to specify the host to bind. For example, -DHsfBindHost=0.0.0.0 binds the HSF Server port to all NICs of the server running HSF.
Specify the time interval between service publishing
-Dhsf.publish.interval=400 HSF services are exposed immediately when published. You can configure this parameter if your application cannot handle the workload during startup. The default value is 400. Unit: milliseconds.
Specify the write buffer limits for each channel of the HSF consumer or provider
-Dhsf.client.low.water.mark=32, -Dhsf.client.high.water.mark=64, -Dhsf.server.low.water.mark=32, -Dhsf.server.high.water.mark=64.
Specifies the write buffer limits (unit: KB) for each channel of the HSF consumer. If the write buffer of the consumer exceeds the upper limit, the channel prohibits the write operations of new requests and returns an error. Write operations are resumed when the write buffer drops below the lower limit.
Specifies the write buffer limits (unit: KB) for each channel of the HSF provider. If the write buffer of the provider exceeds the upper limit, the channel prohibits the write operations of new responses, and the consumer times out because no response is received. Write operations are resumed when the write buffer drops below the lower limit.
The upper and lower limits must be set as a pair, and the upper limit must be greater than the lower limit.
Retrieve the result of a generic call without outputting the class field information
-Dhsf.generic.remove.class=true.
Configure the global client timeout
-DdefaultHsfClientTimeout.
Specify whether the HSF call duration includes time-consuming logic such as connection creation and address selection
-Dhsf.invocation.timeout.sensitive The default value is false.