muc mangement

Hello, I have 100.000 groups in ejabberd cluster can I balance groups on ejabberd nodes?
or uses dedicated ejabberd servers for groups in cluster?
how can I see number of groups on each nodes?
thanks in advance

When you say group, I guess

When you say group, I guess you want to say MUC room.

nets wrote:

Hello, I have 100.000 groups in ejabberd cluster can I balance groups on ejabberd nodes?

Each room lives only in one node of the cluster: in the node where the user that created it is connected. That room is visible and can be joined from the other nodes, but lives only where it was created.

From what I know, it isn't possible to move a room to another node.

nets wrote:

or uses dedicated ejabberd servers for groups in cluster?

nets wrote:

how can I see number of groups on each nodes?

There is no easy way to get that information. If you apply this patch, you can see it in the WebAdmin:

diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl
index a8dbc24..62531ed 100644
--- a/src/mod_muc_admin.erl
+++ b/src/mod_muc_admin.erl
@@ -422,7 +422,8 @@ make_rooms_page(Host, Lang, {Sort_direction, Sort_column}) ->
 	      <<"Persistent">>,
 	      <<"Logging">>,
 	      <<"Just created">>,
-	      <<"Room title">>],
+	      <<"Room title">>,
+	      <<"Node">>],
     {Titles_TR, _} =
 	lists:mapfoldl(
 	  fun(Title, Num_column) ->
@@ -467,6 +468,7 @@ build_info_room({Name, Host, Pid}) ->
     S = get_room_state(Pid),
     Just_created = S#state.just_created,
     Num_participants = length(dict:fetch_keys(S#state.users)),
+    Node = node(Pid),
 
     History = (S#state.history)#lqueue.queue,
     Ts_last_message =
@@ -486,7 +488,8 @@ build_info_room({Name, Host, Pid}) ->
      Persistent,
      Logging,
      Just_created,
-     Title}.
+     Title,
+     Node}.
 
 get_queue_last(Queue) ->
     List = p1_queue:to_list(Queue),
@@ -502,7 +505,8 @@ prepare_room_info(Room_info) ->
      Persistent,
      Logging,
      Just_created,
-     Title} = Room_info,
+     Title,
+     Node} = Room_info,
     [NameHost,
      integer_to_binary(Num_participants),
      Ts_last_message,
@@ -510,7 +514,8 @@ prepare_room_info(Room_info) ->
      misc:atom_to_binary(Persistent),
      misc:atom_to_binary(Logging),
      misc:atom_to_binary(Just_created),
-     Title].
+     Title,
+     misc:atom_to_binary(Node)].
 
 
 %%----------------------------

thanks a lot, It takes a lot

thanks a lot, It takes a lot of time to load the groups from mysql (single thread), Do you think reading groups(from mysql) through a few cpu(multi threading) will decrease the time?

Syndicate content