You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org
Our database hosts can run either a single mariadb instance (single-instance) or multiple (multi-instance). This affects how they are addressed over the network, and the systemd setup within the host itself.
Mariadb runs on port
:3306, and is controlled by the
mariadb.service systemd unit. Monitoring is provided by the
prometheus-mysqld-exporter.service unit. This instance is referred to by internal tools as the plain hostname, e.g.
The mariadb port and systemd unit name are determined by the sections the host is in.
The mapping from section to port is controlled by this list.
s1 instances on multi-instances hosts run on
:3311, m5 multi-instances run on
:3325, and so on.
These instances are referred to by internal tools as the plain hostname + the port. E.g.
The systemd unit is more straight-forward, it's
s4 would be
Monitoring uses the same scheme. E.g. the exporter for m3 on multi-instance hosts is
Determining if a host is single- or multi-instance
The simplest clue is to look at the motd on login. For example:
... db1159 is a Misc DB Server (mariadb::core) DB section m1 The last Puppet run was at Fri Jun 4 13:11:28 UTC 2021 (12 minutes ago). ...
This is a single-instance host; there's only one section listed. Compare with:
... dbstore1005 is a DBStore multi-instance server (mariadb::dbstore_multiinstance) DB section s6 DB section s8 DB section staging DB section x1 The last Puppet run was at Fri Jun 4 13:17:58 UTC 2021 (8 minutes ago). ...
This is a multi-instance host; it has 4 sections listed.