Bartosz DziewoĆski wrote:
On 2017-09-11 15:41, Manuel Vacelet wrote:
It is recommended to use a different DB for each wiki (By setting a different $wgDBname https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBname for each wiki). However if you are limited to a single database, you can use a different prefix ($wgDBprefix https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgDBprefix) to separate the different installs.
But it's not detailed why it's recommended. I'd like to know if there is any downside of using the prefix strategy (peformances, upgrades, etc) ?
I think the only downside is that you'll have to keep the prefixes in mind when writing your own SQL queries. Making and restoring database backups for individual wikis will also be less convenient.
Speaking generally, if there's a MediaWiki-related recommendation, it's probably based on the behavior of Wikimedia wikis such as Wikipedia. Wikimedia wikis split into one MediaWiki installation per database, though many smaller wikis share the same database host. Also, speaking generally, it's often easier to combine things that were separate than to separate things that were combined.
For your particular question, I think the main considerations are how big your wiki farm is in total and how large each wiki is expected to be. In my mind, there's a pretty substantial difference between a wiki farm that has five members versus a wiki farm that has 800 members. Every MediaWiki installation consists of dozens of database tables. And, as alluded to, it's typically easier to keep databases on the same host, unless you want to go down the road of clustering and sharding. If you're expecting to have a wiki farm with five members, but one member will have 5 million articles and 4 members will have 200 articles combined, you may want to split based on that.
As Bartosz notes, there shouldn't be any issues with using $wgDBprefix other than mild inconvenience if you write a lot of database queries directly, which is unlikely. $wgDBprefix may be your best option if you can only have a single database. (Though maybe, if you're limited to a single database, you want to consider a different hosting provider.) Bartosz is also correct that lots of tools work best at the database-level, though many of them also have support for the use-case/setup that you're describing.
Manuel Vacelet wrote:
I've got questions around Wiki Farm setup, I'm not sure if it's the right place to ask the question. If there is a better channel, feel free to say so.
This mailing list is a fine place. There's also mediawik-l@lists.wikimedia.org if you prefer mailing lists, or many IRC channels on the freenode network. Potentially helpful channels are #mediawiki or #wikimedia-tech.
MZMcBride