Cache Cluster Configuration Settings
There are several factors that should be taken into consideration when setting up a cache cluster. This section serves to highlight some of these considerations in terms of NCache.
Important
In case you want to update any cache settings please refer to the Update Cache Config section to follow the set of steps.
Cluster Port and Port Range
Cluster ports are the ports at which NCache clusters start. You can also specify the port range so that if the current port is unavailable, the server will automatically pick the next available port in the range.
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.
Important
Make sure the cache is stopped before proceeding.
- Against the cache name, click on View Details.
This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Cluster Settings in the left bar.
Change the Cluster Port and Port Range, as required.
Click on Save Changes to apply this configuration to the cache.
Start the cache to resume operations.
Manually Editing NCache Configuration
Specify port through config.ncconf file located at %NCHOME%\config. %NCHOME%
is the NCache install directory. In config.ncconf of EACH server specify the <cluster-port>
in <cluster-settings>
tag under the <cache-settings>
section:
<cache-config>
<cluster-settings ...>
<cluster-connection-settings cluster-port="7806" ../>
</cluster-settings>
</cache-config>
Specify port range through config.ncconf file located at %NCHOME%\config. %NCHOME%
is the NCache install directory. Specify the port-range
key in the <cluster-connection-settings>
tag:
<cache-config>
<cluster-settings ...>
<cluster-connection-settings cluster-port="7806" port-range="1" ../>
</cluster-settings>
</cache-config>
Operation TimeOut
Operation Timeout is the maximum time in seconds during which a clustered operation must be completed, otherwise, the operation will fail. The default Timeout value is 60 seconds and cannot be less than that. Operation Timeout can be changed in the following way:
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 Advanced Settings tab and click on Cluster Settings in the left bar.
Change the Operation timeout.
- Click on Save Changes to apply this configuration to the cache.
Manually Editing NCache Configuration
Specify operation timeout through config.ncconf file located at %NCHOME%\config. %NCHOME%
is the NCache install directory. In config.ncconf of EACH server specify the operation-timeout
key in the <cluster-settings>
tag:
<cache-config>
<cache-settings ...>
<cluster-settings operation-timeout="60sec">
...
</cluster-settings>
</cache-settings>
</cache-config>
Connection Retries
Nodes participating in a cluster are connected through TCP connections which may break up due to network failure. These retries are about when a connection goes down then, the cache node tries to establish a connection with configured retries. This is done Connection Retries times. In other words, the value of Connection Retries specifies how many times the node should try to restore the connection.
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 Advanced Settings tab and click on Cluster Settings in the left bar.
Set the Connection Retries as per your requirement.
- Click on Save Changes to apply this configuration to the cache.
Manually Editing NCache Configuration
Specify connection retries count through config.ncconf file located at %NCHOME%\config. %NCHOME%
is the NCache install directory. In config.ncconf of EACH server specify the connection-retries
key in the <cluster-connection-settings>
tag:
<cache-config>
<cache-settings ...>
<cluster-settings ...>
<cluster-connection-settings connection-retries="2" ../>
</cluster-settings>
...
</cache-Settings>
</cache-config>
Retry Interval
Retry Interval specifies the time between two successive connection retries.
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 Advanced Settings tab and click on Cluster Settings in the left bar.
Set the Retry Interval as per your requirement.
- Click on Save Changes to apply this configuration to the cache.
Manually Editing NCache Configuration
Specify retry interval through config.ncconf file located at %NCHOME%\config. %NCHOME%
is the NCache install directory. In config.ncconf of EACH server specify the connection-retry-interval
key in the <cluster-connection-settings>
tag:
<cache-config>
<cache-settings ...>
<cluster-settings ...>
<cluster-connection-settings connection-retry-interval="2secs"../>
</cluster-settings>
...
</cache-Settings>
</cache-config>
Statistic Replication Interval
This option is available for clustered cache only. Statistics replication interval is the time interval in seconds after which a node sends its statistics to all other nodes in a cluster.
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 Advanced Settings tab and click on Cluster Settings in the left bar.
Set the Statistic replication interval as per your requirement.
- Click on Save Changes to apply this configuration to the cache.
Manually Editing NCache Configuration
Specify statistic replication interval through config.ncconf file located at %NCHOME%\config. %NCHOME%
is the NCache install directory. In config.ncconf of EACH server specify the stats-repl-interval
key in the <cluster-settings>
tag:
<cache-settings ...>
<cache-topology topology="partitioned">
<cluster-settings operation-timeout="60sec" stats-repl-interval="1sec">
...
</cluster-settings>
</cache-topology>
</cache-settings>
See Also
Configure Caches
Configure Clients
Management Operations
General Cache Settings