This topic describes how to set JVM -D startup parameters when developing High-Speed Service Framework (HSF) applications.

-Dhsf.server.port

Specifies the port for starting HSF services. The default value is 12200. Use another port than the default port if you start multiple HSF providers locally.

-Dhsf.server.max.poolsize

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

-Dhsf.server.min.poolsize

Specifies the minimum size of the thread pool of the HSF provider. The default value is 60.

-Dhsf.client.localcall

Enables or disables the precedence of calling local HSF clients. The default value is true.

-Dpandora.qos.port

Specifies the Pandora monitoring port. The default value is 12201. Use another port than the default port if you start multiple HSF providers locally.

-Dhsf.http.enable

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

-Dhsf.http.port

Specifies the HTTP port used by the HSF application to provide services externally. The default value is 12220. Use another port than the default port if you start multiple HSF providers locally.

-Dhsf.run.mode

Specifies whether the HSF consumer performs a targeted call, that is, bypassing Config Server. The value 1 indicates that a targeted call is disallowed, and the value 0 indicates a targeted call is allowed. The default value is 1. Do not set this parameter to 0 unless necessary.

-Dhsf.shuthook.wait

The wait time for gracefully disconnecting an HSF application, in ms. The default value is 10000.

-Dhsf.publish.delayed

Specifies whether to delay publishing all services. The default value is false, indicating not to delay service publishing.

-Dhsf.server.ip

Specifies the IP address to be bound. By default, the IP address of the first network interface controller (NIC) is bound when multiple NICs exist.

-DHsfBindHost

Specifies the host to be bound. By default, the HSF server binds the IP address of the first NIC and reports it to the address registry when multiple NICs exist. If you set this parameter to -DHsfBindHost=0.0.0.0, the HSF server port is bound to all NICs of the local device.

-Dhsf.publish.interval=400

Specifies the time interval between the publishing of two services. HSF services are instantly exposed when being published. You can set this parameter to mitigate the burden on starting applications during service exposure. The default value is 400, in ms.

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

  • The unit is KB. When the consumer exceeds the upper limit, the channel forbids writing new requests and returns an error. Writing is resumed when the write buffer drops below the lower limit.
  • When the provider exceeds the upper limit, the channel forbids writing new responses, and the consumer times out because no response is received. Writing is 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, without output of the class field.

-DdefaultHsfClientTimeout

Specifies the global time-out period of the consumer.

-Dhsf.invocation.timeout.sensitive

Determines whether the HSF call duration includes the time consumption logic such as connection creation and address selection. The default value of hsf.invocation.timeout.sensitive is false.