Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(calling): update failover logic for cc #3805

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

rarajes2
Copy link
Contributor

@rarajes2 rarajes2 commented Sep 3, 2024

COMPLETES #< SPARK-548141 >

This pull request addresses

Updates the failover logic for registration and keepalive as shown below

  1. Login of Agent using Agent desktop and selecting browser to register using Webrtc - primary mobius region down.
  • During login flow when Agent desktop tries to register using webrtc stack, the Calling SDK will wait for ~2 minutes (114 seconds to be precise) and if the primary Mobius cluster is not able to register the user, it will failover to the backup region. The SDK will make multiple retries as per existing logic at time intervals exponentially increasing (t0, t0 + 30, t0+ 66, t0 + 114) .
  • Once the SDK registers to secondary region, it will remain connected to that until the SDK tries to re-register again (agent refreshes page, login-logout or any similar action that restarts client) at which point the SDK will try to register to primary region again.
  1. Agent registered but not active on call - primary mobius region cluster where agent is registered is down.
  • calling SDK will keep doing the registration keep alive 4 times (30 * 4 seconds = 120 s) before doing DR to secondary region Mobius cluster

by making the following changes

Handles the failover as described above.

Registration Failover
cc-registration-failover

Keepalive Failover
cc-keepalive-failover

Note: For log files please check the SPARK-548141

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@rarajes2 rarajes2 requested a review from a team as a code owner September 3, 2024 14:09
@rarajes2 rarajes2 added the validated If the pull request is validated for automation. label Sep 3, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3805.d3m3l2kee0btzx.amplifyapp.com

@rarajes2 rarajes2 marked this pull request as draft September 4, 2024 03:57
@rarajes2 rarajes2 force-pushed the wxcc-mobius-failover-SPARK-548141 branch from 6c9845b to 769bcca Compare September 6, 2024 04:33
@rarajes2 rarajes2 marked this pull request as ready for review September 6, 2024 04:34
Copy link
Contributor

@Shreyas281299 Shreyas281299 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just 1 nitpick.

@@ -681,13 +689,17 @@ export class Registration implements IRegistration {
private startKeepaliveTimer(url: string, interval: number) {
let keepAliveRetryCount = 0;
this.clearKeepaliveTimer();
const isCCFlow = this.serviceData.indicator === ServiceIndicator.CONTACT_CENTER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant we use the above isCCFlow variable here also?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can define a class variable isCCFlow, because if callingClient is created with cc service indicator it will always remain a cc flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Made isCCFlow a private class level variable and updated the logic everywhere.

@rarajes2 rarajes2 force-pushed the wxcc-mobius-failover-SPARK-548141 branch from a56f740 to 459a351 Compare September 18, 2024 03:01
@rarajes2 rarajes2 enabled auto-merge (squash) September 18, 2024 03:03
@rarajes2 rarajes2 merged commit c04a29f into webex:next Sep 18, 2024
11 checks passed
pagour98 pushed a commit to pagour98/webex-js-sdk that referenced this pull request Sep 27, 2024
pagour98 pushed a commit to pagour98/webex-js-sdk that referenced this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants