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.