How to Balance Data in a Cache Cluster?

In NCache, for partitioned or partitioned-replica topologies, an intelligent hash-based algorithm is used to automatically distribute data among nodes in a cache cluster. This Data distribution is mostly equal among servers which allows you to take full benefit of all cache servers in the cluster.

However, there can be some situations (rare) where you see one server with more items than others. One reason could be that similar pattern keys end up on the same node and this can cause an imbalance of data among cluster nodes. This may result in one of the nodes handling more data and requests which might lead to inefficient utilization of cluster nodes.

The Data Balancing feature of NCache explicitly distributes data symmetrically over the present nodes. This feature balances data based on the amount of cached data size that each node has consumed, not on the number of cache items. This results in a uniform spread of data across all nodes of the cache cluster.

There are two methods to balance data in your cache cluster, automatic and manual.

Auto Data Balancing

Follow the steps mentioned below to enable the Auto Data Balancing feature using the NCache Web Manager:

  1. Launch the NCache Web Manager and click on the View Details button against your cache cluster.
  2. Under the Advanced Settings, go to the Auto Data Balancing tab, and check the Enable Auto Data Balancing checkbox.
  3. Set a Balancing Threshold. This threshold specifies the percentage of data size above the average data size per node.
  4. Set the Balancing Interval in seconds. This interval is the time after which data will be automatically balanced on all nodes.
  5. Advanced Settings
  6. When done, click the Save Changes button to enable Auto Data Balancing in your cluster.

This will ensure that data between your cache clusters balances automatically upon hitting the defined Balancing Threshold.

Manual Data Balancing

Follow the steps mentioned below to manually balance data in your cache cluster using the NCache Web Manager:

  1. Launch the NCache Web Manager and click on the View Details against your cache cluster.
  2. Scroll down to the Server Nodes section and click on
  3. From the displayed list of options, click on the Balance Data Load option
Balance Data Load

This will ensure that data between your cache clusters balances out when you click Balance Data Load.

Verification of Data Balancing

You can monitor your cache clusters using the NCache Web Monitor to determine if data between them is balanced or not.

What to Do Next?

Signup for monthly email newsletter to get latest updates.

© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.