-
Notifications
You must be signed in to change notification settings - Fork 584
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
[BUG]Federation HA - Passive node not getting Presence syncing broadcast #3564
Comments
@xhuang-sangoma , it might be a bit a confusion here. The |
@bogdan-iancu Thanks for looking into this. Following your suggestion, I updated configuration like below: Active Node (Note that I've commented out the cluster_be_active_shtag option)
Backup Node:
The result
Seems the backup node is still trying to insert entries to presentity table. It's not supposed to do so as a backup node.
Active node prints out entry in subs_phtable_list:
Backup node has empty list:
|
@xhuang-sangoma , I'm a bit confused when comes to what you want to achieve here. Do you want to setup a pure active-backup configuration or a federation (with multiple active nodes sharing parts of the data) ?? |
Our final goal is to setup a Federation cluster. But right now we're only
testing the most simple cluster with two nodes, one active, one backup.
…On Wed, 29 Jan 2025, 01:15 Bogdan Andrei IANCU, ***@***.***> wrote:
@xhuang-sangoma <https://github.com/xhuang-sangoma> , I'm a bit confused
when comes to what you want to achieve here. Do you want to setup a pure
active-backup configuration or a federation (with multiple active nodes
sharing parts of the data) ??
—
Reply to this email directly, view it on GitHub
<#3564 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDZ7XP2HKLJY6SDGD6VOD332M6NKVAVCNFSM6AAAAABVUUNHNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJZGI4TIOBQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Federation = collection of nodes, all active, node partitioning the presence data (no node has the full presentity and subscription data set). HA setup = active - backup setup where only one node is active; the backup nodes do have access to the full presentity and subscription data set. So, I would say you want to do a HA setup, not a federation. |
We're following this tutorial: https://www.opensips.org/Documentation/Tutorials-Distributed-User-Location-Federation Specifically this one that says "Federated User Location (with HA)": It's just that right now we're only testing with a single pair of active/passive nodes setup and expecting the two nodes sharing a VIP to have the presentity and subscription data fully replicated, then we'll expand the test to multiple pairs as a federation cluster. So, is Federation and HA exclusive to each other or they can be combined as shown in the above diagram? |
@xhuang-sangoma , the above you mentioned is 100% about User Location, so about registrations. While the initial discussion started about presence sharing........ so, what are we talking about here :) ? |
@bogdan-iancu Sorry for the confusion. We use opensips to handle both registrations and presence, so we're expecting presence to work the same way as user location in regard to cluster. Actually your tutorial at: https://blog.opensips.org/2018/03/27/clustering-presence-services-with-opensips-2-4/ The only difference in our setup is that we don't want to use a shared database (due to mysql performance issue when too much writing to active_watchers table). So we set the cluster_federation_mode to full-sharing expecting the presentities and subscriptions get synced to the backup node, but the result is the backup node has empty subscriptions list. Is this archivable or we must use a shared db to store and share subscriptions? |
Couple of issues:
|
@bogdan-iancu Thanks for clarification. The 3.5.x presence module document still points to the blog post: https://opensips.org/docs/modules/3.5.x/presence.html#presence_clustering Would you please explain in what scenario can the 'full-sharing' option be used in the cluster_federation_mode parameter of the presence module? The document says following:
which makes us think it's possible to have a HA without a sharing DB. |
Yes, as the doc says, in
Again, the only way to share subscriptions is via DB. |
Thanks for confirming. We'll setup a shared DB to test again and report back. |
We tested the presence cluster using a shared MySQL DB. Here're some of the issues we found:
|
OpenSIPS version you are running
Describe the bug
This is a followup issue relating to a previous issue reported at: #2960
We have two opensips instances configured as active-backup HA pair in a federation cluster mode.
The active node has following settings:
The backup node has following settings:
This is the entries in clusterer table:
The VIP 69.168.214.70 is configured on the active node_id 1.
We have phones sending REGISTER and SUBSCRIBE (for BLF) requests to VIP on the active node. And the subscriptions are processed by active node and stored in memory.
Note that we set db_update_period and fallback2db to 0 and cluster_federation_mode to full-sharing as we don't want to use db to share the subscriptions. Instead we want the backup node to get subscriptions synced by receiving the cluster broadcast from the active node.
We are expecting that subscriptions processed by active node will also be synced to the backup node. And if we run "opensips-cli -x mi subs_phtable_list" on both active and backup node, they should show the same list.
The result is that only active node prints out the subscriptions list. And the backup node prints empty list.
This is causing an issue that if we switch VIP and make the backup node active, since the backup node doesn't have the subscriptions, it will fail to handle any PUBLISH and deliver NOTIFYs to subscribers.
We think the issue is related to this code commit: 8b96b70
In this code, the backup node checks the cluster_be_active_shtag, since it's off, the node will stop accepting any presence cluster traffic. We think this is incorrect.
The expected behaviour is that the backup node should continue to accept the presence cluster broadcast and store the subscriptions in memory. It just does NOT NEED TO PROCESS any of them.
The text was updated successfully, but these errors were encountered: