Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how does Ejabberd manage databases for clustering? [closed]

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?

like image 833
Andres Canella Avatar asked Mar 28 '13 01:03

Andres Canella


People also ask

How does ejabberd clustering work?

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.

How do I connect to ejabberd server?

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).


1 Answers

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.

like image 83
user425720 Avatar answered Sep 21 '22 02:09

user425720