Skip to content

Confid Auto Assign Design

Background

A confid refers to a unique identifier assigned to each Webex meeting. For testing purposes, Webex has provided the MCT (Monitoring Control Tool) with a specific range of confid from 100,000 to 1,000,000. Since confid must be unique, each agent group is allocated a specific range within this block. It is essential that these ranges are assigned correctly to avoid duplicates, and automation is recommended to mitigate human error.

Current Confid Allocation (Manual)

The table below outlines the manually assigned confid ranges for each agent group:

Agent Name min max
WBXDFW-INTERNAL 100,000 249,900
WBXJFK-BACKUP 250,000 399,900
WBXDFW-MMP 400,000 499,999
WBXJFK-INTERNAL 500,000 599,999
WBXFRA01 600,000 649,999
WBXSIN01 650,000 699,999
WBXDFW-BACKUP 700,000 749,999
WBXLHR01 750,000 799,999
(Unassigned) 800,000 849,999
WBXAMS01 850,000 900,000
WBXJFK-MMP 900,000 999,999

Automated Confid Range Assignment

Each agent group specifies its confid capacity relative to a base capacity unit. For example, if the base unit is 50,000, WBXFRA01 has a capacity of 1, WBXDFW-MMP has a capacity of 2, and WBXDFW-INTERNAL has a capacity of 3. Larger groups should have a higher capacity number.

When a new agent registers with the central system (mct-status-api), it should automatically be assigned a confid range based on the confid base and capacity. If the MCT confid range becomes full, a reallocation mechanism must be in place to accommodate new registrations.

Confid Reassignment

In the event that the entire range from 100,000 to 1,000,000 is allocated, confid ranges must be reassigned to create space for new agents. The reassignment must ensure that recently used confid are not reused in the short term to avoid duplicates.

Example of Reassignment

Consider a simplified example with a range from 1 to 100:

No. Capacity Base 5 Base 4
1 2 1-10 1-8
2 2 10-20 8-16
3 4 20-40 16-32
4 2 40-50 32-40
5 1 50-55 40-44
6 2 55-65 44-52
7 2 65-75 52-60
8 3 75-90 60-72
9 2 90-100 72-80

Column 3 shows the range before reassignment, while Column 4 illustrates the range after reassignment.

Reporting and Adjusting Confid Ranges

Agents must report their current confid index through a heartbeat mechanism, which includes the currentConfidIndex in the payload. This data is crucial to prevent conflicts during reassignment.

System set a startIndex for confid range

When agent group is trying to fetch a confid range, a startIndex should also be included, because if using confid from start of the range, possibly it's already used by previous agent group.

Determining the Start Index

After reassignment, the system must set a startIndex for each agent group's range, ensuring that the new starting point avoids conflicts with recently used confid. The startIndex should be strategically chosen to minimize the risk of duplication. Considerations for setting the startIndex include:

  1. No Confid Conflict: If there's no overlap with previously used confid in the new range, set the startIndex to the beginning of the newly assigned range.
  2. Single Confid Conflict: If there's an overlap of a single confid, choose a startIndex within the new range that avoids this conflict.
  3. Multiple Confid Conflicts: If multiple conflicts exist, choose the startIndex within the larger sub-range that avoids these conflicts.

For cases with potential conflicts, it is advisable to select a startIndex that is central to the available range to reduce the likelihood of duplication.

Example Scenarios for Setting the Start Index

Based on the provided table:

  • Case 1: No conflict in the new range. - For example, if the current start index of group 1 is 2, and group 2 is 17, the new start index for group 2 could be 9.
  • Case 2: A single confid conflict in the new range. - For example, if the current start index of group 1 is 2, and group 2 is 12, the new start index for group 2 could be any number between 13 and 16 or 9 and 11.
  • Case 3: Multiple confid conflicts in the new range. - For example, if the current start index of group 1 is 9, and group 2 is 12, the new start index for group 2 could be any number between 13 and 16 or 10 and 11.

It is recommended to set the start index in the middle of the available range to minimize duplication risks.

Conclusion

  1. Agents must report their current startIndex along with their heartbeat.
  2. No action is required if the confid range is not yet full.
  3. The system must reassign confid ranges and adjust each group's startIndex based on the reported startIndex when the range is full.
  4. Agents should retrieve and use the newly assigned confid range and corresponding startIndex.

By implementing the above strategies, we can ensure a seamless and error-free process for confid allocation and reassignment.