Configure Ports
NCache uses TCP ports for communication. Default TCP port is 8250. These ports can be changed, if required, by changing the values of the registry key (TCP.PORT) written upon the installation of NCache.
This key can be found under the following path:
HKEY_LOCAL_MACHINE/SOFTWARE/ALACHISOFT/NCACHE
Please note that NCache Manager application assumes the default port. Therefore, upon changing the values of this port, Local Cache/Cluster cannot be administered through NCache Manager application. However, NCache command line utilities and tools provide the option to address the Local Caches/Clusters on other ports.
Cluster Port
Cluster ports are the ports at which NCache clusters start. You can change the default value of these ports from NCache Manager. For installed caches (myReplicatedCache, myPartitionedCache), NCache looks for ports starting from 7800 onwards and allot the available ports to these caches in the available port range.
Port of a cluster can be changed in the following ways:
Using NCache Manager
Click on the cache name in Cache Explorer to open cache settings.
Go to Cluster Settings tab.
Change the Cluster Port, if required.
Right click on the cache name in Cache Explorer and select Apply Configuration option.
Through config.ncconf
Port of a cluster can be changed using config.ncconf as follows:
<cluster-connection-settings cluster-port="8706" port-range="2"/>
Port Range
Sets the port range for each node in the cluster. If the current port is unavailable, then the server will automatically pick the next available port in the pool. Port Range of a cluster can be changed in the following two ways:
Using NCache Manager
Click on the cache name in Cache Explorer to open cache settings.
Go to Cluster Settings tab.
Change the Port Range.
Right click on the cache name in Cache Explorer and select Apply Configuration option.
Through config.ncconf
The value of port range can also be set using config.ncconf as follows;
<cluster-connection-settings cluster-port="8706" port-range="2"/>
Server Port
At the NCache Server Port, NCache Server starts and accepts different client connections. Default value of this port is "9800". You can change the default value through Alachisoft.NCache.Service.exe.config file as follows:
<add key="NCacheServer.Port" value="9800" />
This will change the value at Server side. This change must also be made in client.ncconf to make client aware of this change, as follows:
<ncache-server port="9800" connection-retries="60" retry-interval="1"/>