You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, we are ready to check newly created cluster status. Connect to maxscale pod and run the following commands from any of the maxscale pod and you will get the same result.
Once the database is in running state we can conncet to each of three nodes. We will use login credentials `MYSQL_ROOT_USERNAME` and `MYSQL_ROOT_PASSWORD` saved as container's environment variable.
@@ -323,7 +342,7 @@ Once the database is in running state we can conncet to each of three nodes. We
323
342
We recommend using a non-root user for production environments. The root user has extensive privileges, which can pose security risks. Therefore, it is advisable to create a dedicated user with appropriate permissions for production use.
Welcome to the MariaDB monitor. Commands end with ; or \g.
404
-
Your MariaDB connection id is 78
405
-
Server version: 10.5.23-MariaDB-1:10.5.23+maria~focal mariadb.org binary distribution
406
-
407
-
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
408
-
409
-
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
410
-
411
-
MariaDB [(none)]> SELECT 1;
412
-
+---+
413
-
| 1 |
414
-
+---+
415
-
| 1 |
416
-
+---+
417
-
1 row inset (0.000 sec)
418
-
419
419
MariaDB [(none)]> quit;
420
420
Bye
421
421
```
422
422
423
-
## Check the Cluster Status
424
-
425
-
Now, we are ready to check newly created cluster status. Connect to maxscale pod and run the following commands from any of the maxscale pod and you will get the same result.
@@ -802,9 +785,27 @@ MariaDB [playground]> SELECT * FROM test_db.t1;
802
785
803
786
# write query is only running on master node.
804
787
```
805
-
806
788
We can see the queries are successfully executed through the Maxscale Proxy server and read write split is working as expected.
807
789
790
+
## Access and Explore the MaxScale UI
791
+
To enable the MaxScale UI, set`spec.topology.maxscale.enableUI: true`in the configuration. The MaxScale UI runs on port 8989. To access it, use the following kubectl command to forward the port:
Copy file name to clipboardExpand all lines: docs/guides/mariadb/clustering/overview/index.md
+9-6
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,16 @@ section_menu_id: guides
14
14
15
15
# MariaDB Clustering
16
16
17
-
KubeDB currently supports two cluster modes: Multi-Master MariaDB Galera Cluster and Master-Slave MariaDB Standard Replication.
17
+
KubeDB supports two primary clustering modes for MariaDB: Multi-Master MariaDB Galera Cluster and Master-Slave MariaDB Standard Replication. Below, we explore key concepts of these clustering approaches, highlighting their mechanisms, benefits, and use cases in a distributed database environment.
18
18
19
-
Here we'll discuss some concepts about Cluster.
19
+
Below, we explore key concepts of MariaDB clustering, focusing on the two clustering modes supported by KubeDB: Multi-Master MariaDB Galera Cluster and Master-Slave MariaDB Standard Replication
20
20
21
-
## So What is Replication
21
+
## What is Replication
22
22
23
-
Replication involves copying data from one MariaDB server to one or more other MariaDB servers, rather than storing it on a single server. The replication mode determines read and write capabilities. In a multi-master setup, you can perform read and write operations on any server. In a master and slave architecture, read and write operations are supported on the master host, while slave hosts support only read operations.
23
+
Replication in MariaDB involves duplicating data from one MariaDB server (the source) to one or more other MariaDB servers (replicas), rather than storing it on a single server. This process enhances data availability, scalability, and fault tolerance. The replication mode determines the read and write capabilities of each server in the cluster. MariaDB supports two primary replication architectures: multi-master and master-slave.
24
+
25
+
- Multi-Master Replication: In a multi-master setup, every server in the cluster can handle both read and write operations. This architecture, exemplified by the MariaDB Galera Cluster, ensures high availability and scalability by allowing applications to distribute workloads across all nodes.
26
+
- Master-Slave Replication: In a master-slave architecture, the master server supports both read and write operations, while slave servers are limited to read operations. This setup is ideal for read-heavy workloads, with slaves providing scalability for queries and serving as backups.
24
27
25
28
The following figure shows a cluster of four MariaDB servers of multi-master replication:
26
29
@@ -52,7 +55,7 @@ There are some limitations in MariaDB Galera Cluster that are listed [here](http
52
55
53
56
## MariaDB Standard Replication
54
57
55
-
MariaDB Standard Replication is a widely used mechanism for copying data from one MariaDB server (the master) to one or more other MariaDB servers (the slaves). This replication mode ensures data redundancy, enhances availability, and supports read scalability by distributing read operations across multiple servers. It operates in a single-master and slave architecture, where the master server handles both read and write operations, while slave servers are limited to read operations.
58
+
MariaDB Standard Replication is a widely used mechanism for copying data from one MariaDB server (master) to one or more other MariaDB servers (slave). This replication mode ensures data redundancy, enhances availability, and supports read scalability by distributing read operations across multiple servers. It operates in a single-master and slave architecture, where the master server handles both read and write operations, while slave servers are limited to read operations.
56
59
57
60
Ref: [About MariadDB Standard Replication](https://mariadb.com/kb/en/replication-overview/#standard-replication)
58
61
@@ -65,7 +68,7 @@ Ref: [About MariadDB Standard Replication](https://mariadb.com/kb/en/replication
65
68
- Active-passive single-master topology
66
69
- Read and write to master, and read only to slave node
67
70
- Automatic node joining
68
-
- Automatic failover using maxscale proxy
71
+
- Automatic failover using Maxscale Proxy Server
69
72
- Binary Log-Based replication
70
73
- Direct client connections, native MariaDB look & feel
0 commit comments