This topic describes how to configure Java Virtual Machine (JVM) -D startup parameters when you develop High-speed Service Framework (HSF) applications.

-Dhsf.server.port

Specifies the number of the port bound for starting HSF services. The default value is 12200. Modify the parameter value if you want to start multiple HSF providers in an on-premises environment.

-Dhsf.server.max.poolsize

Specifies the maximum size of the thread pool for an HSF provider. The default value is 720.

-Dhsf.server.min.poolsize

Specifies the minimum size of the thread pool for an HSF provider. The default value is 50.

-Dhsf.client.localcall

Specifies whether to prioritize local calls. The default value is true.

-Dpandora.qos.port

Specifies the number of the port for Pandora monitoring. The default value is 12201. Modify the parameter value if you want to start multiple HSF providers in an on-premises environment.

-Dhsf.http.enable

Specifies whether to enable the HTTP port. The default value is true.

-Dhsf.http.port

Specifies the number of the HTTP port over which HSF services are exposed. The default value is 12220. Modify the parameter value if you want to start multiple HSF providers in an on-premises environment.

-Dhsf.run.mode

Specifies whether an HSF consumer can make targeted calls that bypass ConfigServer. The value 1 indicates that targeted calls are not allowed, whereas the value 0 indicates that targeted calls are allowed. The default value is 1. We recommend that you retain the default value.

-Dhsf.shuthook.wait

Specifies the wait time before HSF services are gracefully disabled. The default value is 10000. Unit: milliseconds.

-Dhsf.publish.delayed

Specifies whether to delay the publishing of all services. The default value is false, which indicates that the delay is not required.

-Dhsf.server.ip

Specifies the IP address to which the HSF provider is bound. When multiple network interface cards (NICs) exist, the HSF provider is bound to the IP address of the first NIC by default.

-DHsfBindHost

Specifies the host of the NIC whose IP address the HSF provider is bound to. By default, when multiple NICs exist, the HSF provider is bound to the IP address of the first NIC and reports the IP address to the address registry. You can use this parameter to specify the host of the NIC whose IP address the HSF provider is bound to. For example, if you set this parameter to -DHsfBindHost=0.0.0.0, the HSF provider is bound to IP addresses of all NICs of the host.

-Dhsf.publish.interval=400

Specifies the time interval between the publishing of two services. HSF services become exposed immediately when they are published. You can set this parameter to mitigate the burden of starting applications. The default value is 400. Unit: milliseconds.

-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 for each channel of the HSF consumer or provider.

  • 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 forbids 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 forbids 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.

-Dhsf.generic.remove.class=true

Retrieves the result of a generic call, but does not return the class field.

-DdefaultHsfClientTimeout

Specifies the global timeout period for the HSF consumers.

-Dhsf.invocation.timeout.sensitive

Specifies whether the time-consuming logic, such as connection creation and address selection, is implemented in the HSF call duration. The default value of hsf.invocation.timeout.sensitive is false.