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.
Note
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 client-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 ~/[InstallDir]/config
- Edit the following properties in the file:
CacheServer.BindToClusterIP=127.0.0.1
CacheServer.BindToClientServerIP=127.0.0.1
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.
- After IP binding has been changed for NICs, please make sure that all client nodes configured against this cache cluster should now have their client.ncconf file (located at NCache\config) updated with the same server name.
Example:
<cache id="MyCache" client-cache-id="" client-cache-syncmode="optimistic" default-readthru-provider="" default-writethru-provider="" load-balance="True">
<server name="20.200.20.59"/>
Important
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
- 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.
Step1: 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 ~/[InstallDir]/config
- Edit the
CacheServer.Port
property in the file. Here you can specify a different client/server TCP port.
CacheServer.Port = 9800
Important
Make sure that you specify the same port in all your cache servers.
- Restart NCache Java Client service for these changes to take effect.
Step2: Modify client.ncconf for all clients (remote/local)
In order to access client.ncconf, navigate to the
config
folder under NCache Java Client installation dir. Enter the following command:Edit the following properties in the file:
<configuration bind-ip="127.0.0.1">
<server port="9800" connection-retries="5" retry-interval="1" retry-connection-delays="0" client-request-timeout="90" connection-timeout="5" local-server-ip=""/>
</configuration>
Here you can specify a different port.
Important
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.
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 ~/[InstallDir]/config
- Edit the following properties in the file:
JmxServer.Port = 1617
JmxSnmp.Port = 1618
You can specify different SNMP and JMX ports.
- Restart NCache Java Client service for these changes to take effect.
Change Cache Management Port
Cache Management 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 ~/[InstallDir]/config
- Edit the following properties in the file:
CacheManagementServer.Port = 8250
Here you can specify a different port for Cache Management.
- Restart NCache Java Client service for these changes to take effect.
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:
- Navigate to the folder config by using the 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.