Skip to content

Commit 9ab8143

Browse files
authored
Merge pull request #135 from vshn/add/mariadb_scaling
Add MariaDB scaling docs
2 parents cc49f31 + 9c47723 commit 9ab8143

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

docs/modules/ROOT/nav.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
** xref:vshn-managed/mariadb/restore.adoc[Restore]
4848
** xref:vshn-managed/mariadb/security.adoc[Security]
4949
** xref:vshn-managed/mariadb/usermanagement.adoc[]
50+
** xref:vshn-managed/mariadb/replicas.adoc[]
5051
5152
.Redis
5253
* xref:exoscale-dbaas/redis/index.adoc[On Exoscale]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
= Replication and High Availability
2+
3+
MariaDB by VSHN comes with support for multiple instances and High Availability using https://mariadb.com/kb/en/galera-cluster/[Galera].
4+
You have the option to configure up to two additional replicas.
5+
Please be aware of its https://mariadb.com/kb/en/mariadb-galera-cluster-known-limitations/[limitations] before using it.
6+
7+
== Enable High Availability
8+
9+
To enable high availability you need to set the number of instances to `3`, which will provision two replicas.
10+
11+
The following example configuration will start a MariaDB service with three replicas.
12+
13+
NOTE: When HA is enabled, changing users via the VSHNMariaDB claim will result in a quick restart of ProxySQL. This will interrupt the connection for a few seconds. Also be aware that connections will only work via users that are specified in the claim.
14+
15+
[source,yaml]
16+
----
17+
apiVersion: vshn.appcat.vshn.io/v1
18+
kind: VSHNMariaDB
19+
metadata:
20+
name: mariadb-app1-prod
21+
spec:
22+
parameters:
23+
instances: 3
24+
----
25+
26+
NOTE: Please be aware that enabling high availability will use significantly more resources and will cost three times more.
27+
28+
IMPORTANT: On APPUiO Cloud, it's currently not possible to deploy more than two instances, or more than a single instance that is larger than `standard-2`.
29+
Please contact https://docs.appuio.cloud/user/contact.html[APPUiO Cloud support], if this blocks you from running your application.
30+
31+
32+
== ProxySQL
33+
34+
In order to optimize the connections to the Galera Cluster, a separate two node ProxySQL cluster is deployed as well.
35+
The ProxySQL cluster will manage reconnections in case of failovers.
36+
ProxySQL will identify itself as a MySQL server version 8, which is the expected behavior.
37+
38+
This ProxySQL will also consume certain resources in addition to Galera itself.
39+
Please consult the following table for more details.
40+
41+
[cols="1s,1,1", options="header", stripes="even"]
42+
43+
|===
44+
|
45+
|Requests
46+
|Limits
47+
48+
|CPU
49+
|50m
50+
|500m
51+
52+
|Memory
53+
|64Mi
54+
|256Mi
55+

0 commit comments

Comments
 (0)