Client Node Level
This section details the step-by-step instructions about how to utilize Connection Timeout, Connection Retries, Retry Interval, Client Request Timeout, Enable Client Load Balancing, and for optimal client functionality.
Using the NCache Management Center
Launch the NCache Management Center by browsing to
http://localhost:8251
(Windows) or<server-ip>:8251
(Windows + Linux).In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure. Against the cache name, click on View Details.
This opens up the detailed configuration page for the cache. Go to the Client Nodes tab and click on the icon to open client node settings.
On Main tab you can configure Connection Timeout, Connection Retries, Retry Interval, and Client Request Timeout. All values are in seconds.
Using the Settings tab, you can:
Enable/disable client load balancing using the check box Enable Client Load Balancing.
Specify Server Priority for this client.
- Click on Save Changes to apply this configuration to the cache.
Manually Editing NCache Configuration
Following are the cache level configurations in client.ncconf.
<configuration>
<ncache-server connection-retries="5" retry-connection-delay="0"
retry-interval="1" client-request-timeout="90"
connection-timeout="5" port="9800"
local-server-ip="20.200.20.39"/>
</configuration>
These configuration tags are explained below.
Client Request TimeOut
client-request-timeout
is the period for which the client API waits for a response to a command from the server. After this period has elapsed, an "OperationFailedException" is thrown. By default, it is 90 seconds and the minimum value could be 60 seconds. The time specified less than the minimum value will automatically be reset to the minimum value, i.e., 60 seconds.
Connection Retries
connection-retries
are the number of retries the client makes on the whole list of servers mentioned in the client.ncconf at the time of connection establishment. It is the same for the connection break scenario.
Retry interval
If the connection with the cache server breaks, then the client tries to reconnect with the server, and the retry-interval
flag introduces the delay between each retry. This flag is specified in seconds.
Connection TimeOut
connection-timeout
is the period threads wait before throwing OperationFailedException
during connection-break, while one thread tries to establish a connection with the cache server. If the connection is successfully established then, all threads will complete their respective operations. Otherwise, they will throw OperationFailedException
.
Retry Connection Delay
retry-connection-delay
is the time interval when the client API waits before going through another iteration of connection-retries
. Delay is specified in seconds.
Local Server IP
local-server-ip
is the IP address of your local server machine.
Port
port
specifies the TCP port at which the client sends the connection request to the server.