NCache being a network-intensive solution has mainly two kinds of communication going on in a cache cluster.
- Cache server to server communication
- Cache Client to server communication
If you have two NICs available on a cache server then it is highly recommended that you use both NICs for these NCache communications.
NCache will start utilizing both Network Interface Cards (NICs) on your Cache Servers, once you have configured our Dual NIC interface feature.
Using Dual NICs will enhance the overall bandwidth throughput by distributing the load to two NICs thus immensely increasing performance. One NIC will be dedicated for server-to-server communication inside the cache cluster and the second NIC being reserved only for client-to-server communication. In this way, network load for cache communication is distributed on two NICs and you’ll be utilizing your resources more efficiently increasing overall performance.
Here is how you can configure the NCache dual NIC feature.
How to Configure Dual NICs:
There are two ways to configure dual NICs for NCache:
- Automatic (through NCache Manager) (Recommended)
- Manual (through Configuration files)
Configuring Dual NIC through NCache Manager:
- Create a clustered cache using NCache manager
- Add server nodes to this cache cluster
- Right-click on your server nodes one by one and then select “Select Network Interface Card” option from the context menu
- NCache Manager will detect and list all the NICs on that node. Select the particular NIC according to your choice for cluster-wide and client to server communication
- After clicking “Apply”, you’ll be prompted to restart NCache Service to work with fresh settings
- Click ‘Yes’ to restart NCache Service
For detailed information on configuring dual NICs please visit NCache Help Document.
Manually Configuring Dual NIC
For manually specifying separate IPs for NCache cluster server-server communications and the client to server communications in order to use two NICs on a cache server for NCache, you’ll have to modify the following two lines in “Alachisoft.NCache.Service.exe.config” file located at (C:\Program Files\NCache\bin\service):
<add key = "NCacheServer.BindToClusterIP" value = "126.96.36.199" /> <add key = "NCacheServer.BindToClientServerIP" value = "188.8.131.52" />
BindToClusterIP: You can inform NCache which Network interface card to use for cluster-wide communication and provide the appropriate IP Address.
BindToClientServerIP: You can inform NCache which interface to use for client-server communication and provide the appropriate IP address. NCache will listen on this IP for all client requests.
Once NCache service IP binding is changed for Dual NICs, you should also make sure that all client nodes configured against this cache cluster should now have their “Client.ncconf” (C:\Program Files\NCache\Config) file updated with the client-server IP address as followed.
For example, for a cache named ‘DemoCache’ you need to specify IP address of NIC dedicated for client-server communication in Client.ncconf file on client nodes ( same server IP address that you specified for BindToClientServerIP tag above).
cache id="DemoCache" client-cache-id="" client-cache-syncmode="optimistic" default-readthru-provider="" default-writethru-provider="" load-balance="True"> <server name="184.108.40.206"/>