Summary: How to define the load-balancing policy in a static cluster.
Overview Load-balancing is used to share the load between different spaces in a cluster, especially when they are running on separate physical machines. This procedure below explains how to define a load-balancing policy: To define a load balancing policy:
- Continue from step 8 in Defining cluster name and spaces.
- From the Cluster Options area, select the Load-Balancing check-box. Observe that the Load Balancing tab is enabled at the bottom portion of the dialog box.

- Select the operations you want to load-balance by selecting the check-boxes on the left. Observe that the drop down list adjacent to each check-box becomes enabled if the check-box is selected. If you select Write and Read (and not Default) this means that load-balancing is only enabled for these two operations.
- Select the policy type for the operations you enabled:
Policy Type |
Description |
Local-space |
This policy type routes the operation to the local embedded space by default (without specifying the exact space name). It is used in a p2p cluster. |
Round-robin |
this policy type distributes the operations to group members in a round-robin fashion. |
fixed-by-hash |
This policy type allows the clustered proxy to direct the operations to a single space member in the group, chosen by the hash code of the first operation. |
Hash-based |
This policy uses the indexed field as the key for calculating the hash, so that the space member is configured in the following manner: Space-Index = index-field.hashCode() % NoOfSpaceMembers. |
weighted-round-robin |
Similar to round-robin, this policy assigns a relative weight to each group member (according to its processing power or other factors). |
weighted-hash |
Similar to hash-based, this policy assigns a relative weight to each group member (according to its processing power or other factors). |
- The Default check-box applies to those operations you did not explicitly select in the previous steps. Select it, and choose a policy type, to enable load-balancing for those operations. For example, if you only selected the Write operation, selecting Default enables load-balancing for Read, Take and Notify. The policy type you select under Default applies to all three of these operations.
 |
If the Default check-box is not selected, and you have not selected all the check-boxes above it, there is no-load balancing for some operations. For example, if you only select Write, Read and Notify, leaving Take and Default clear, there is no load-balancing for the Take operation. |
- You may now define additional policies for the group. See Defining a replication policy or Defining a Failover policy. If you do not need to define additional policies for this group, press Create to finish creating it.
- If you need to define additional groups, see Creating groups.
If not, click the Update button and then click the Finish button to complete the cluster configuration creation.
- Create the space – see gsInstance - GigaSpaces CLI.
|