Does it replicate all the data to every node or does it store data fragments on each node and then fetches every needed fragment from different node at runtime? Or how does this work?
Does clustering still work correctly if, instead of Mnesia, you use MySQL?
ejabberd includes an algorithm to load balance the components that are plugged on an ejabberd cluster. It means that you can plug one or several instances of the same component on each ejabberd cluster and that the traffic will be automatically distributed.
Before you get access to the Web Admin you need to enter as username, the JID and password from a registered user that is allowed to configure ejabberd . In this example you can enter as username ' [email protected] ' to administer all virtual hosts (first URL).
By default everything goes to mnesia and most of stuff is replicated. Also you can choose if mnesia tables go to disc or memory. Basically, you can re-configure mnesia table location as you wish, but usually tables are replicated in memory, to keep them close.
It is also true that clustering ejabberd is done via spanning nodes over mnesia cluster, so probably it is not worth an effort to get rid of that.
Most of mods (which implement xeps) use mnesia however they have mysql equivalents. It is even wider - they have SQL equivalents which are suffixed with "_odbc". Example: mod_roster and mod_roster_odbc.
To sum up, you can end up with light weight mnesia to handle configs and some in-memory stuff and use central mysql for heavy stuff. Location of mysql is configurable in ejabberd config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With