• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

IP Binding with Multiple NICs

IP Binding with Multiple NICs is a critical architectural optimization for high-traffic NCache environments. By using multiple Network Interface Cards (NICs) and employing IP Binding, you can distribute your network load and, thus increase the bandwidth throughput. NCache, being a network-intensive solution, allows configuring dual NICs, thereby distributing the network load of communication on two NICs which enhances overall performance.

NCache Communication Types

NCache involves two kinds of network communication in a database cluster:

  • Communication between server nodes within a cluster (cluster communication).
  • Communication between client and server (client-server communication).

Cluster communication is communication between NCache server nodes in a cluster. It includes node discovery, cluster membership, state transfer, synchronization, and other server-to-server operations.

Client-server communication is communication between application clients and NCache servers. It includes cache operations such as add, update, get, remove, queries, and other client requests.

In a multi-NIC environment, these communication types can be configured separately.

Communication Type Configuration Key Purpose
Cluster communication NCacheServer.BindToClusterIP Specifies the IP address used for server-to-server communication.
Client-server communication NCacheServer.BindToClientServerIP Specifies the IP address used by clients to communicate with the NCache server.

By default, NCache uses the IP address available as BindToClientServerIP for both client-server and inter-cluster communication. However, when multiple NICs are available, you can bind each communication type to a dedicated IP address.

Note

NCache command line tools communicate with the NCache server on BindToClusterIP.

Important

If a server node is part of multiple clusters, changing the IP binding on that node affects all clusters using that node. The service configuration file is updated accordingly.

Configuration File Location

When NIC binding is configured, the changes are reflected in the NCache service configuration file. The file location depends on the installation type:

Installation Type Configuration File
.NET Framework %NCHOME%\bin\service\Alachisoft.NCache.Service.exe.config
.NET Core on Windows %NCHOME%\bin\service\Alachisoft.NCache.Service.dll.config
.NET Core on Linux /opt/ncache/bin/service/Alachisoft.NCache.Daemon.dll.config

After updating IP binding settings manually, restart the NCache Service for the changes to take effect.

Important

If one node is part of multiple clusters, note that any IP change will be reflected on all clusters and the configuration file will be updated accordingly.

Using the NCache Management Center

  • Launch the NCache Management Center by browsing to http://localhost:8251 or <server-ip>:8251.

  • In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure.

  • Select the cache name, click on View Details.

NCache Management Center showing the 'View Details' button for selecting a cache configuration.

  • This opens up the detailed configuration page for the cache.

  • Under the Server Nodes tab, check the box against the server node IP to change NIC.

  • You can do so by using either of the following methods:

    • Method 1: Click on the Toolbar in NCache Management Center with the 'Configure NIC' button to configure the NIC for a server node. button on the toolbar to change NIC.
    • Method 2: Click on "..." against the server IP and select Configure NIC.

Detailed configuration page for a cache node in NCache Management Center showing the option to change the network interface card (NIC).

Server node started web

  • Upon either selection, the Configure NIC page will open. It will list all network cards available on that node with their assigned IP addresses.

  • Select the Cluster or Client/Server option as per your requirement, from drop-down in front of the IP with which you want.

Configuration page in NCache Management Center for binding cluster or client/server traffic to a specific NIC with a dropdown selection.

  • On clicking OK, you will receive the following prompt warning you about the running caches.

Warning prompt in NCache Management Center confirming the NIC change for cluster or client/server traffic binding.

  • Click OK to complete the binding process.

Manually Configure IP Binding

You can also configure IP binding manually by updating the NCache service configuration file.

Use the following setting to bind cluster communication to a specific IP address:

<add key="NCacheServer.BindToClusterIP" value="<cluster-ip>" />

Use the following setting to bind client-server communication to a specific IP address:

<add key="NCacheServer.BindToClientServerIP" value="<client-server-ip>" />

For example:

<add key="NCacheServer.BindToClusterIP" value="20.200.20.40" />
<add key="NCacheServer.BindToClientServerIP" value="20.200.20.41" />

In this example, 20.200.20.40 is used for communication between NCache server nodes, and 20.200.20.41 is used by application clients to connect to the NCache server.

After manually updating the configuration file, restart the NCache Service.

Recommended NIC Assignment

If your server has two NICs, the recommended configuration is:

NIC Usage Recommended For
Cluster communication Server-to-server traffic, cluster membership, synchronization, and state transfer
Client-server communication Application client requests and cache operations.

Troubleshooting IP Binding Issues

If you have dedicated network cards configured for public and private communication, then you might not be able to create new clusters. Additionally, it is possible that existing NCache clusters could fail to communicate. Please note, that the following problems will occur if nodes are unable to communicate with each other on specific interface(s).

  • The NCache Service starts at one interface, whereas other nodes try to communicate with it on the other interface. Therefore, the two nodes are always unable to communicate with each other even when both nodes are fully functional.

  • The NCache Clients connect to the NCache Server to get OutProc cache instances. So, the NCache Server starts at one interface, whereas the client tries to connect to it on the other interface. This way, though the NCache Server is ready to accept the client requests, the client applications will always be unable to connect to the OutProc caches.

  • Situations can arise where the cluster nodes are unable to join with each other and no cluster forms. This could stem from one node listening to join requests from other nodes on one network interface, while the other nodes send these join requests on the other network interface.

Workaround

To avoid such problems, you can bind the NCache Service to a specific IP that is publicly available to other nodes in the cluster. You can do this in the service configuration file in %NCHOME%\bin\service or opt/ncache/bin/service (for Linux). Please note that for .NET Core Linux installation, the file name is Alachisoft.NCache.Daemon.dll.config.

<add key = "NCacheServer.BindToClientServerIP" value = "<your-ip>" />

See Also

Graceful Node Down
Separate Cache Host Process

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top