Deprecation of replica groups in MediaWiki
Amir Sarabadani <[email protected]> Wed, 3 Dec 2025 19:28:19 +0100
| Newsgroups | gmane.org.wikimedia.mediawiki,gmane.science.linguistics.wikipedia.technical |
|---|---|
| Message-ID | <CAGApm_2f_jh83x100X3t87OvVdUsfN3Kz9k_Uv9JkcfGNyouTQ@mail.gmail.com> |
--===============3717177982778597931== Content-Type: multipart/alternative; boundary="0000000000008cc6a0064510620b" --0000000000008cc6a0064510620b Content-Type: text/plain; charset="UTF-8" Hello, As part of simplifying and modernizing the database load balancing logic in MediaWiki, we have now deprecated several functionalities in rdbms library: If you're writing MediaWiki code that involves getting a database connection: - Trying to get a replica with a group (with the exception of "dump" and "vslow") is discouraged. - Starting from 1.45, attempts to get a replica with any group except "vslow" or "dump" will trigger a deprecation warning - Starting from 1.46, attempts to get a replica that is not vslow/dump will be just ignored and a replica from the general group will be returned. If you're maintaining a MediaWiki setup with more than one replica: - Starting from 1.46, MediaWiki load balancer configuration ignores "groupLoads" and "groupLoadsBySection". So if you have replicas pooled in such groups only, they will be effectively depooled. - Also from 1.46: In every general set of replicas, rdbms library designates the replica with lowest weight as the "vslow" replica and directs queries with vslow/dump group accordingly. - If you have many replicas and rely on groups, it's better to enable "shuffleSharding" instead (example <https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1193108>). This will force rdbms library to show only three randomly (but consistently) picked replicas to each client IP which would improve cache locality and fault tolerance. This feature is available from 1.45 onwards. If you have any questions. Feel free to comment on the ticket: https://phabricator.wikimedia.org/T405087 Best -- *Amir Sarabadani (he/him)* Staff Database Architect Wikimedia Foundation <https://wikimediafoundation.org/> --0000000000008cc6a0064510620b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hello,</div><div>As part of simplifying and modernizi= ng the database load balancing logic in MediaWiki, we have now deprecated s= everal functionalities in rdbms library:</div><div><br></div><div>If you= 9;re writing MediaWiki code that involves getting a database connection:</d= iv><div><ul><li>Trying to get a replica with a group (with the exception of= "dump" and "vslow") is discouraged.</li><li>Starting f= rom 1.45, attempts to get a replica with any group except "vslow"= or "dump" will trigger a deprecation warning</li><li>Starting fr= om 1.46, attempts to get a replica that is not vslow/dump will be just igno= red and a replica from the general group will be returned.</li></ul><br></d= iv><div>If you're maintaining a MediaWiki setup with more than one repl= ica:</div><div><ul><li>Starting from 1.46, MediaWiki load balancer configur= ation=C2=A0ignores "groupLoads" and "groupLoadsBySection&quo= t;. So if you have replicas pooled in such groups only, they will be effect= ively=C2=A0depooled.</li><li>Also from 1.46: In every general set of replic= as, rdbms library designates the replica with lowest weight as the "vs= low" replica and directs queries with vslow/dump group accordingly.</l= i><li>If you have many replicas and rely on groups, it's better to enab= le "shuffleSharding" instead (<a href=3D"https://gerrit.wikimedia= .org/r/c/operations/mediawiki-config/+/1193108">example</a>). This will for= ce rdbms library to show only three randomly (but consistently) picked repl= icas to each client IP which would improve cache locality and fault toleran= ce. This feature is available=C2=A0from 1.45 onwards.</li></ul><div><br></d= iv><div>If you have any questions. Feel free to comment on the ticket:=C2= =A0<a href=3D"https://phabricator.wikimedia.org/T405087">https://phabricato= r.wikimedia.org/T405087</a></div><div><br></div></div>Best<div><span class= =3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s= ignature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><table><tbody= ><tr><td style=3D"padding:5pt"><img alt=3D"" src=3D"https://upload.wikimedi= a.org/wikipedia/commons/thumb/8/8b/Wikimedia-logo_black.svg/54px-Wikimedia-= logo_black.svg.png" style=3D"border:0px;vertical-align:middle" width=3D"54"= height=3D"54"></td><td style=3D"vertical-align:top;padding:5pt;line-height= :1.38;font-family:Arial,sans-serif"><b style=3D"font-size:9pt">Amir Sarabad= ani (he/him)</b><br><span style=3D"font-size:10.6667px">Staff Database Arch= itect</span><br><a href=3D"https://wikimediafoundation.org/" title=3D"found= ationsite:" style=3D"font-size:9pt;color:rgb(102,51,102);background:none" t= arget=3D"_blank"><span style=3D"color:rgb(0,0,0);font-size:8pt">Wikimedia F= oundation</span></a></td></tr></tbody></table></div></div></div></div> --0000000000008cc6a0064510620b-- --===============3717177982778597931== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ MediaWiki-l mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/ --===============3717177982778597931==--