You can supply tuning options to control how long the eXtreme Scale client code waits for requests to complete, and for how long it attempts to retry requests that are associated with accessing the data grid.
You can configure settings for the eXtreme Scale client that control how long the client attempts to create network connections, how long the client attempts to process a data grid request to a partition, and how long it attempts to retry that request to the partition, before it returns an exception to your application.
Factors for tuning request and retry timeout values in XIO and ORB
For some tuning options, where you set the values depends on which transport you are using, either eXtremeIO (XIO) or Object Request Broker (ORB). These transport-level tuning options have the initial impact on interactions with your client because they govern how long the transport attempts network socket connections and how long an individual remote procedure call (RPC) analogous to a data grid operation is given to complete.
ORB settings for tuning request and retry timeout values
As you tune the RequestTimeout and ConnectionTimeout settings, adjusting them based on the default recommendations can be appropriate. You can also set these settings with the same value, where you define these settings that are based on how long you want the request timeout to be.
The requestRetryTimeout property is set in milliseconds. Set the value greater than zero for the request to be retried on exceptions for which retry is available. Set the value to 0 to fail without retries on exceptions. To use the default behavior, remove the property or set the value to -1.
XIO settings for tuning request retry timeout
Ways to set request retry timeout
You can configure the request retry timeout value on the client properties file or in a session. The session value overrides the client properties setting. If the value is set to greater than zero, the request is tried until either the timeout condition is met or a permanent failure occurs. A permanent failure might be a DuplicateKeyException exception. A value of zero indicates the fail-fast mode setting and the data grid does not attempt to try the transaction again after any type of transaction.
Transaction timeout and request retry timeout
During run time, the transaction timeout value is used with the request retry timeout value, ensuring that the request retry timeout does not exceed the transaction timeout.
Application or other permanent failures return immediately and the client does not try the transaction again. These permanent failures include the DuplicateKeyException and KeyNotFoundException exceptions. Use the fail-fast setting to return all exceptions without trying transactions again after any exceptions.
Grid Type | ORB | XIO |
---|---|---|
A Java™ or .NET client application that accesses an eXtreme Scale API directly |
|
Modify the objectGridClient.properties file for your client application with the following values:
|
HTTP session | Place the client properties file in the classpath, with requestRetryTimeout=10000. | Modify the client properties file for your client
application with the following values:
|
Dynamic cache | Set the property on the cache instance:
|