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:
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.
[root@servername]# cd ~/NCache_install_dir/config
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="MyCache" client-cache-id="" client-cache-syncmode="optimistic" default-readthru-provider="" default-writethru-provider="" load-balance="True">
<server name="20.200.20.59"/>
|
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.
|
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
[root@servername]# cd ~/NCache_install_dir/config
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.
|
2. Modify client.ncconf for all clients (remote/local)
[root@servername]# cd ~/NCache_install_dir/config
<configuration bind-ip="20.200.20.36">
< 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 TCP port.
|
Please make sure that all Port values in client.ncconf and server.properties are consistent.
|
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.
[root@servername]# cd ~/NCache_install_dir/config
JmxServer.Port=1617
JmxSnmp.Port=1618
Here you can specify different SNMP and JMX ports.
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
[root@servername]# cd ~/NCache_install_dir/config
CacheManagementServer.Port=8250
Here you can specify different SNMP and JMX ports.
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:
[root@servername]# cd ~/opt/NCache/config
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