NCache 4.6 - Online Documentation

Post Installation Client/Server Configuration for UNIX

 
Configure Multiple Network Interface Cards
 
NCache Java Client, being a network intensive solution, has mainly two kinds of communication going on in a cache cluster:
 
  • Communication between different cache servers
  • Communication between cache client(s) and cache server(s)
 
For these communications, you need to configure Network Interface Cards, available on your cache server(s), to ensure optimal load sharing. If you have two NICs, NCache Java Client starts utilizing both of them, once “Dual NIC” interface is configured. Using Dual NICs means that you enhance the overall bandwidth throughput by distributing load on two NICs, thus immensely increasing performance. One NIC is dedicated for server-to-server communication inside the cache cluster and second NIC being reserved only for client-to-cache server communication. In this way, network load for cache communication is distributed on two NICs and resources will be utilized more efficiently.
 
If you have two NICs available on a cache server, it is highly recommended to use both NICs for Cache server-to-server and Cache slient-to-server communications.
 
You can specify which NICs to use for your server to server communications and client to server communication. For this purpose you have to make some modifications in the file: server.properties.
 
  • In order to access server.properties, navigate to the config folder under NCache Java Client installation dir. Enter the following command:
[root@servername]# cd ~/NCache_install_dir/config
 
  • Edit the following properties in the file:
 
CacheServer.BindToClusterIP=20.200.20.202
CacheServer.BindToClientServerIP=20.200.20.202
 
BindtoClusterIP: You can inform NCache Java Client which interface to use for cluster-wide communication. In order to do so, provide the IP Address you want the cluster server to bind with.
BindtoClientServerIP: You can inform NCache Java Client which interface to use for client communication. In order to do so, please provide the IP Address you want the client's server to bind with.
 
Example
 
  <cache id="mypartitionedcache" client-cache-id="" client-cache-syncmode="optimistic" default-readthru-provider="" default-writethru-provider="" load-balance="False" enable-client-logs="False" log-level="error">
      <server name="20.200.20.113"/>
    </cache>
 
 
 
Please note that you must use the same IP address while creating your clustered cache to which you have bound your cache server. If you want to use a host-name at the time of defining your cache, then please make sure that the host-name resolves to the same IP address as the one you have bound it to.
 
  • Restart NCache service for these changes to take effect.
 
Client/Server TCP Port
 
By default, all clients communicate with NCache Java Client server on TCP port 9800. If this TCP Port is reserved for any of your other applications or you want to change it for some other reason, you can change it through the property file: server.properties . You will also have to modify the file: client.ncconf.
 
1. Modify Server Properties
 
  • In order to access server.properties, navigate to the config folder under NCache Java Client installation dir. Enter the following command:
 
[root@servername]# cd ~/NCache_install_dir/config
 
  • Edit the following properties in the file:
 
CacheServer.Port=9800
 
Here you can specify a different client/server TCP port.
 
Please make sure that you specify the same port in all your cache servers.
 
  • Restart NCache Java Client service for these changes to take effect.
 
2. Modify client.ncconf for all clients (remote/local)
 
  • In order to access server.properties, navigate to the config folder under NCache Java Client installation dir. Enter the following command:
 
[root@servername]# cd ~/NCache_install_dir/config
 
  • Edit the following properties in the file:

<configuration>
    <ncache-server connection-retries="5" retry-connection-delay="0" retry-interval="1" client-request-timeout="90" connection-timeout="5" port="9800"/>
</configuration>
 
Here you can specify a different TCP port.
 
Please make sure that all Port values in client.ncconf and server.properties are consistent.
 
  • Restart NCache Java Client service for these changes to take effect.
 
3. Change SNMP/JMX Counters Port
 
NCache Java Client uses SNMP and JMX servers to publish performance counters. If the default SNMP/JMX Counter Port is reserved for any of your other application, you are not able to view the counters due to IP conflict. To resolve the IP conflict, you will have to make some modifications in the file: server.properties.
 
  • In order to access server.properties, navigate to the config folder under NCache Java Client installation dir. Enter the following command:
 
[root@servername]# cd ~/NCache_install_dir/config
 
  • Edit the following properties in the file:
 
JmxServer.Port=1617
JmxSnmp.Port=1618
 
Here you can specify different SNMP and JMX ports.
 
  • Restart NCache Java Client service for these changes to take effect.
 
 
4. Change the Cache Management Port
 
Cache Management Port port is used while performing management operations on caches. If the default Cache Management Port is reserved any of your other application or you want to change it for some other reason, you have to make some modifications in the file: server.properties
 
  • In order to access server.properties, navigate to the config folder under NCache Java Client installation dir. Enter the following command:
 
[root@servername]# cd ~/NCache_install_dir/config
 
  • Edit the following properties in the file:
 
CacheManagementServer.Port=8250
 
Here you can specify different SNMP and JMX ports.
 
  • Restart NCache Java Client service for these changes to take effect.
 
 
5. Change JDK/JRE Version
 
At the time of installation, NCache Java Client automatically picks the version information of JDK/JRE installed on your system. If at a later stage, you switch to a different version of JDK/JRE, you need to manually change Java path in the file env.properties in order to configure the JDK/JRE version. Please follow these steps:
 
  • In order to access server.properties, navigate to the config folder under NCache Java Client installation dir. Enter the following command:
 
[root@servername]# cd ~/opt/NCache/config
 
  • Open the file env.properties and provide Java path through the following property:
 
JAVA_HOME=/
 
  • After you have modified Java path, save/write and quit the service file from editor. 
 
  • Restart NCache Java Client service for these changes to take effect.
 
 
See Also