I've configured a ejabberd instance on debian 10, from debian packet (version 18.12). I have 3 virtual host (let's call the example1.com, example2.com and example3.com).
The first one is using LDAP to talk to our Active Directory, in order to authenticate the users, the others are using SQL (mysql) backend to keep user credentials.
What is needed is that every user in these 3 domains must see in his roster all the other users.
In order to achieve this, I've created 4 shared roaster for each virtualhost:
- The first has @all@ as members but no displayed groups, and I'm using this to "export" all the members to the other 2 domains
- The second has @all@ as members and itself as displayed groups, in order to have all the users of that domain see eachself.
- The other two "imports" the "exported" shared groups from the other domains.
It's kinda workig-ish... I can see all the users, grouped as i want, but the server is sucking too much cpu everytimes someone logins (or so it seems).
My fear is that I've implemented a circular dependency and that the server keeps running in circle iterating through all the lists.
Is what I've done legit? Is there a better way to implement this?
Thanks
If there were a loop, ejabberd would either A) consume all resources and crash miserably: you would notice that!, or B) detect the loop and throw a nice crash message in the log files: look for such a thing when a user logins.
Another possibility, if your domains have many accounts (let's say hundreds or thousands), is quite simply a bottleneck: there are too many elements to process by the CPU, or to store in RAM, or to deliver using the network.
If the bottleneck is the network, you can try @online@ instead of @all@ in some of your groups...