cluster: active_dialogs differs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

cluster: active_dialogs differs

OpenSIPS - Users mailing list
Hi friends!

I'm trying to understand the reason of slightly different values
of 'fifo get_statistics active_dialogs' of a 2-node 2.4.5 cluster.

All in all, everything works (calls, switching between nodes, etc).


user@pc:~$ for i in 1 2 ; do ssh voip-sipgw0$i 'opensipsctl fifo get_statistics active_dialogs' ; done
 dialog:active_dialogs:: 51
 dialog:active_dialogs:: 67



Here are some key settings (just to be sure they are identical and correct):

# node1
modparam("tm", "fr_timeout", 5)
modparam("tm", "T1_timer", 2000)
modparam("tm", "T2_timer", 5000)
modparam("tm", "fr_inv_timeout", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

# node2
modparam("tm", "fr_timeout", 5)
modparam("tm", "T1_timer", 2000)
modparam("tm", "T2_timer", 5000)
modparam("tm", "fr_inv_timeout", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)


# node1
tcp_children=1 # for bin/cluster
modparam("clusterer", "current_id", 1)
modparam("clusterer", "db_mode", 0)
modparam("clusterer", "current_info","cluster_id=1,url=bin:10.45.144.77:5555,flags=seed")
modparam("clusterer", "neighbor_info","cluster_id=1,node_id=2,url=bin:10.45.144.79:5555")

# node2
tcp_children=1 # for bin/cluster
modparam("clusterer", "current_id", 2)
modparam("clusterer", "db_mode", 0)
modparam("clusterer", "current_info","cluster_id=1,url=bin:10.45.144.79:5555")
modparam("clusterer", "neighbor_info","cluster_id=1,node_id=1,url=bin:10.45.144.77:5555")


# node1
# please note that I don't use /b flag in profiles names, because I use
# 'dialog_replication_cluster' and 'profile_replication_cluster', as
# mentioned here https://opensips.org/html/docs/modules/2.4.x/dialog.html#dialog-clustering
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "profiles_no_value", "call" )
modparam("dialog", "profiles_with_value", "incoming ; outgoing ; destination")
modparam("dialog", "dlg_sharing_tag", "vip=active")
modparam("dialog", "dialog_replication_cluster", 1)
modparam("dialog", "profile_replication_cluster", 1)

# node2
# please note that I don't use /b flag in profiles names, because I use
# 'dialog_replication_cluster' and 'profile_replication_cluster', as
# mentioned here https://opensips.org/html/docs/modules/2.4.x/dialog.html#dialog-clustering
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "profiles_no_value", "call" )
modparam("dialog", "profiles_with_value", "incoming ; outgoing ; destination")
modparam("dialog", "dlg_sharing_tag", "vip=backup")
modparam("dialog", "dialog_replication_cluster", 1)
modparam("dialog", "profile_replication_cluster", 1)



And now MI commands:

# MI node1
voip-sipgw01 opensips # opensipsctl fifo clusterer_list
Cluster:: 1
        Node:: 2 DB_ID=-1 URL=bin:10.45.144.79:5555 Enabled=1 Link_state=Up      Next_hop=2 Description=none

voip-sipgw01 opensips # opensipsctl fifo clusterer_list_topology
Cluster:: 1
        Node:: 1 Neighbours=2
        Node:: 2 Neighbours=1

voip-sipgw01 opensips # opensipsctl fifo clusterer_list_cap
Cluster:: 1
        Capability:: dialog-dlg-repl State=Ok
        Capability:: dialog-prof-repl State=Ok


# MI node2
voip-sipgw02 opensips # opensipsctl fifo clusterer_list
Cluster:: 1
        Node:: 1 DB_ID=-1 URL=bin:10.45.144.77:5555 Enabled=1 Link_state=Up      Next_hop=1 Description=none

voip-sipgw02 opensips # opensipsctl fifo clusterer_list_topology
Cluster:: 1
        Node:: 2 Neighbours=1
        Node:: 1 Neighbours=2

voip-sipgw02 opensips # opensipsctl fifo clusterer_list_cap
Cluster:: 1
        Capability:: dialog-dlg-repl State=Ok
        Capability:: dialog-prof-repl State=Ok



The cluster is configured using "active-backup" scheme:
https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/

On the active node the MI command "opensipsctl fifo dlg_set_sharing_tag_active vip"
is executed.

I also executed "opensipsctl fifo dlg_cluster_sync" MI command on the backup (standby)
node, because it uses the "main" (most of time active node1) as a seed.


Seems OK, isn't it?!
So, why does the values of active_dialogs in fifo output differ?

-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: cluster: active_dialogs differs

OpenSIPS - Users mailing list
I changed 'tcp_children' from 1 to 2.

Restarted both OpenSIPSes.

But still there's some difference:

   dialog:active_dialogs:: 67
   dialog:active_dialogs:: 82


'opensipsctl fifo dlg_cluster_sync' hasn't equalized the number
of active_dialogs.



-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: cluster: active_dialogs differs

OpenSIPS - Users mailing list
Compared production cluster with testing cluster.

Noticed that on the testing one I used profile's names with /b flag.
So, I added it to the production one.

Restarted both instances, but again the backup node shows
more active dialogs.

The configuration seems to be the same as on my testing cluster, which
shows similar active dialogs for aech node.

Hmm... can not understand what it is.

-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: cluster: active_dialogs differs

OpenSIPS - Users mailing list
We also noticed that when profiles are listed with the /b flag,
it's impossible to get their size via MI / JSON :]

Once the /b flags are removed, the size can be get again.

-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: cluster: active_dialogs differs

OpenSIPS - Users mailing list
After some tests, I see that /b flag does not matter
(I think because 'dialog_replication_cluster' and 'profile_replication_cluster'
options are enabled).

And now,  ~10 min after restart of both OpenSIPS instances,
'active_dialogs' value is the same.

Some magic)

-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users