Open topic with navigation

# Weights for Group Members

An application can assign a weight to a fault tolerance group member process. The weight influences the FTL group service's assignment of the ordinal, which determines the operating role, such as 1 (active). Use weights to make decisions based on hardware speed, hardware reliability, load factors, or other operating environment factors. Programs can adjust weights based on system conditions.

## Weights, Ordinals, and Status

When a process joins a group, a member of greater weight always outranks members of lower weights. The group member process with the greatest weight is assigned ordinal 1 and the status is active (the leader member of the group).

For example, in the following diagram, Member A runs on a computer that is much faster than Member B, so Member A is assigned the greatest weight (200). The FTL group service assigns Member A ordinal 1 which is active status and Member B (weight 100) ordinal 2 which is standby status. Members C and D run on equally fast computers with approximately equal load factors so they are assigned an equal weight of 50 each, which results in the assignment of ordinals 3 and 4 and standby status.

Weights Assigned to Member Processes
Member | Weight Assigned | Ordinal Assigned | Status
--- | --- | --- | ---
Member A | 200 | 1 | Active
Member B | 100 | 2 | Standby
Member C | 50 | 3 | Standby
Member D | 50 | 4 | Standby

## Greater Weight Processes Join

When an inactive member with a greater weight re-joins a group, the member preempts the active member of a lower weight. For example, in the following diagram, when three processes are running, Member B has the greatest weight (100) and is the active member. When Member A (weight 200) joins the group and four processes are running, the FTL group service re-assigns ordinal 1 (active) to Member A and sends an ordinal update to the other processes.

More than Two Roles, Timeline

Processes Running | Member B Weight 100 | Member C Weight 50 | Member D Weight 50 | Member A Weight 200
--- | --- | --- | --- | ---
3 | Ord=1 Role=Active | Ord=2 Role=Standby | Ord=3 Role=Standby |
4 (Member A joins) | Ord=2 Role=Standby | Ord=3 Role=Standby | Ord=4 Role=Standby | Ord=1 Role=Active

## Members with Equal Weight

Members of equal weight do not outrank each other and the order of equally weighted members joining the group is irrelevant to rank.

Considerations:

- If two members have equal weight, you cannot assume either member outranks the other or that either member will be the first to become the active member.

- An inactive member that is joining never preempts an active member with the same weight. For example, if Members Y and Z have equal weight, and Member Z is already active (ordinal 1), then Member Y does not preempt Member Z.

## Adjusting Weights

In addition to specifying weight when a process joins a group, programs can adjust their weight at any time to reflect changing conditions. For example, when a load factor of a host computer changes, a member process might track the change and adjust its weight accordingly.

When a member's weight is adjusted, the FTL group service recomputes the ordinals members of the group. For large groups this re-computation can affect performance.

## API Weight Settings

Weight is controlled via the FTL Group API. Considerations:

- Weights must be positive integers.

- Zero cannot be used as a weight and is reserved for future use.

- In groups where member weights are assigned, members without a weight are assigned a default weight of 100.

- In groups where no member weights are assigned, the member that joined first gets ordinal 1.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO FTL® - Enterprise Edition

Copyright © 2009-2024. Cloud Software Group, Inc. All Rights Reserved.