Global Options (System properties / Java -Dxxx)

namedescription
“HoraeDB.available_cpus”Specify the number of CPU cores available to the SDK, and use all the number of CPUs in the current environment by default
“HoraeDB.grpc.conn.failures.reset_threshold”Threshold gRPC reset connection, default is 3
“HoraeDB.client.read.write.rw_logging”Simple log output switch for read and write, default is true
“HoraeDB.client.write.collect_wrote_detail”Whether to keep the written table list after the write is successful, default is false
“HoraeDB.client.use_os_signal”Whether to use OS Signal, SIGUSR2 is used by default
“HoraeDB.signal.out_dir”The Signal receiver outputs the content to the specified disk directory, which defaults to the process startup directory
“HoraeDB.rpc.write.limit_percent”RPC adaptive limit write ratio (default 0.7), the rest is reserved for read
“HoraeDB.reporter.period_minutes”Metrics reporter timing output period,default is 30 minutes

HoraeDBOptions

namedescription
clusterAddressThe address of HoraeDB server, which can be a stand-alone address or a cluster address
routeModeThe route mote,support DIRECT and PROXY. DIRECT mode is directly connected to the server, and the routing information is cached on the SDK side, which has better performance; PROXY mode is forwarded through the PROXY module on the server side, which contains performance loss, but it can solve some case that cannot be directly connected, such as network isolation
asyncWritePoolA write scheduling thread pool is required in an async client, which can be configured by user,default is SerializingExecutor,If you configure the pool, please focus on the performance metric async_write_pool.time
asyncReadPoolSame as asyncWritePool for reading, performance metric is async_read_pool.time
databaseThe database used for client, can be overridden by RequestContext
rpcOptionsThe configuration options of the rpc, please refer to RpcOptions for details
routerOptionsThe configuration options of the routing table, please refer to RouterOptions for details
writeOptionsThe configuration options of the writing, please refer to WriteOptions for details

WriteOptions

namedescription
maxRetriesThe max retries for write request, if the server returns an error code, the SDK will determine whether to retry the request; the retry process is transparent to the user, completely asynchronous, and imperceptible to the upper layer
maxWriteSizeIhe maximum data points for each write request, if exceeds, it will be divided into multiple requests, default 512
maxInFlightWritePointsIf the maximum number of data points requested in one write request exceeds the current limit, the request will be blocked
limitedPolicyThe write limiting policy, provide several implementations is blocking, discard and blocking-timeout,default is abort-blocking-timeout(3s) (Block until timeout 3s and fail with an exception),Users can also extend the policy

QueryOptions

namedescription
maxRetriesSame as WriteOptions.maxRetryies for query
maxInFlightQueryRequestsSame as WriteOptions.maxInFlightWriteRows for query
limitedPolicyThe query limiting policy, provide implementations smae as WriteOptions.limitedPolicy,but default is abort-blocking-timeout(10s)

RpcOptions

namedescription
defaultRpcTimeoutThe rpc call timeout, each request can specify timeout separately, if not specified, default is 10s
rpcThreadPoolSizeThe maximum number of threads in the thread pool that handles RPC calls
rpcThreadPoolQueueSizeThe maximum number of threads in pool for processing RPC calls, IO threads will be used to process the response if set to 0, default is 64. The core_size of the thread pool should be smaller than this value, the formula is: Math.min(Math.max(Cpus.cpus() << 1, 16), rpcThreadPoolQueueSize)
maxInboundMessageSizeThe maximum number of bytes that can be accepted for one Inbound message, default is 64M
flowControlWindowFlow control based on http2.0, default is 64M
idleTimeoutSecondsThe maximum idle time of the connection, the connection may fail if the time exceeds, default is 5 minutes
keepAliveTimeSecondsThe time interval for sending keep-alive ping on the transport (default is infinite seconds, same as turning off), contain exponential avoidance strategy
keepAliveTimeoutSecondsThe timeout for waiting keep-alive ping (default is 3 senconds), if no ack is received within this time, it will close the connection.
keepAliveWithoutCallsIf enale this param (defaul is disable), keep-alive pings can be sent even if no requests are made. It has overhead, it is recommended to use idleTimeoutSeconds instead of this option
limitKindLimiting algorithm type, supports Vegas and Gradient, default is Gradient
initialLimitLimiter initial limit
maxLimitLimiter max limit
smoothingLimiter smoothing factor, default 0.2
blockOnLimitBlock the Request when limit is exceeded, default is false

RouterOptions

namedescription
maxCachedSizeThe maximum number of local cached routing table, default is 10_000, it will be periodically GC if exceeded
gcPeriodSecondsThe periodic interval of GC which will clear unused router, default is 60 seconds
refreshPeriodSecondsThe periodic interval of refreshing routing table in background, default is 30 seconds.