Wiki farm configuration

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Wiki farm configuration

Manuel Vacelet
Hi there,

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.

In Wiki Family page [1] there is a quote saying

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

Regards,
Manuel


[1] https://www.mediawiki.org/wiki/Manual:Wiki_family
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Wiki farm configuration

Bartosz Dziewoński
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.

You might also occasionally run into bugs in extensions which did not
keep the prefixes in mind in their SQL queries. But I've had table name
prefixes on my development wiki for years and don't remember the last
time I ran into this.

--
Bartosz Dziewoński

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Wiki farm configuration

MZMcBride-2
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
[hidden email] if you prefer mailing lists, or many IRC
channels on the freenode network. Potentially helpful channels are
#mediawiki or #wikimedia-tech.

MZMcBride



_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Wiki farm configuration

Manuel Vacelet
On Wed, Sep 13, 2017 at 1:35 AM, MZMcBride <[hidden email]> wrote:

> 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
> [hidden email] if you prefer mailing lists, or many IRC
> channels on the freenode network. Potentially helpful channels are
> #mediawiki or #wikimedia-tech.


Thanks to both of you for your detailed answers.

Manuel
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l